Psychopy won't start due to alsa issue

Whenever I try to start psychpy from the app shortcut nothing pops up and if i try to run it from the terminal I get the following error:

Expression ‘alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 923
Expression ‘alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 923

I am using Ubuntu 18.04