| Reference | Downloads | Github

PsychoPy2 quit unexpectedly when using pyo

I have an experiment code that works fine on my MacBook Pro laptop with ‘pyo’ sound library. However, if I run the same code with ‘pyo’ on Mac Mini, the experiment won’t even start. Upon running the code, the screen seems to run, but immediately quits out, showing “PsychoPy2 quit unexpectedly.” Weirdly, this same code works on my MacBook pro, so I am assuming it has to do with Mac Mini and ‘pyo’? ‘pyo’ 0.8.6 is installed in my Mac Mini.

When I run in Mac Mini, with pyo the sound won’t even turn on. However, if I change the library preference to ‘pygame’, the sound plays normally. So, I tried circumventing the problem by using ‘pygame’ instead, but if I use ‘pygame’ for the experiment, the experiment stops in the middle and doesn’t proceed after a sound is played and paused.

So I am trying to make ‘pyo’ work, and was wondering if anyone had similar problem or helpful advice.

Similar problems: Yes, constantly.

Helpful advice: This often seems to be related to memory load. Shut down background apps and basically try to free up as much RAM as you can. Also try different sound file formats and see if some work more reliably than others.

Long-term, there is a third backend, sounddevice, which should take over from pyo and pygame. You could try testing it out and see if it works better for you, I have had mixed results.

Thanks for the reply.

Yes, I couldn’t figure out why pyo wasn’t working. I used pygame instead and made some changes to my code to make it work.

Sounddevice didn’t seem to work as well. For now, I will stick with pygame :slight_smile: