psychopy.org | Reference | Downloads | Github

Please help: PsychoPy not playing sound

Hello everyone,

I am having trouble getting PsychoPy 3 (PY2) to play back a simple sound and would greatly appreciate your help fixing the problem.

OS (e.g. Win10): Windows 10
PsychoPy version (e.g. 1.84.x): PsychoPy 3.0.5 (PY2)
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:

Trying to get Psychopy to playback a simple sound

What did you try to make it work?:

Initially I was using a code component in builder to play a beep (stored as a .wav file externally) when participants made an incorrect response during my experiment. However this did not work. To make sure it was not my code, or some other aspect of my experiment, I used the builder to make a new experiment with nothing in it other than a sound component that played after a two second delay - this was set up completely using the builder (no custom code anywhere) and did not work/produced the same error message.

I’ve tested this on two different Windows 10 computers and found the same issue.

I need to use the PY2 version of PsychoPy 3 as it is compatible with iohub.

What specifically went wrong when you tried that?:

The experiment launched and the routine initiated but no sound played. Psychopy output produced the following error message:

Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\sounddevice.py”, line 740, in callback_ptr
return _wrap_callback(callback, data, frames, time, status)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\sounddevice.py”, line 2516, in _wrap_callback
callback(*args)
File “C:\Program Files (x86)\PsychoPy3_PY2\lib\site-packages\psychopy\sound\backend_sounddevice.py”, line 192, in callback
for thisSound in self.sounds.copy():
AttributeError: ‘list’ object has no attribute ‘copy’

Many thanks in advance for your help,
Chris.