For some very strange reason, my experiment won’t start (instantly freezes on black screen and goes to ‘not responding’) when I include the following bit of code. The line merely loads in a .wav file and assigns it to a variable. As soon as I comment it out, the script works perfectly fine.
warning_beep = sound.Sound("C:\Users\Eyelink User\Desktop\ocarina.wav")
I’m stumped by this, I’ve never had this problem before and I have no idea how to fix it since it’s a very simple statement. I’m importing sound like this:
from psychopy import visual, core, gui, event, sound
Does anyone have any ideas as to why this line causes my script to go unresponsive? I’m using the latest psychopy.
Update: I tried the same code at home on Psychopy version 1.83.01, and it worked with without any issues. I then installed the newest Psychopy version, and the code does run but I also get a console audio error message (below).
portaudio error in Pa_AbortStream: Unanticipated host error
Exception TypeError: “‘NoneType’ object is not callable” in <bound method Server.del of <pyolib.server.Server object at 0x149EA1B0>> ignored
When I remove the line ‘`warning_beep = sound.Sound(“C:\Users\Eyelink User\Desktop\ocarina.,wav”)’, I no longer get the error message. Does the newest version have some audio issues?