| Reference | Downloads | Github

Builder crashes when playing sequence of sounds

I am using builder (latest Win release) to present a series of wav file (15-20 secs duration) and collecting single key presses.

It appears to work for a few trials and then throws an error (wish you could copy and paste them) immediately after playing and before prompting for a response. The last few lines read…

File “C:Program files (x86)\Psychopy3_PY2\lib\site-packages\psychopy\sounds\”. line 206 in callback"
ValueError: list.remove(x) : x not in list

Does this make any sense to anyone?

If I play the sounds in a fixed order, the crash will happen in the same place, but if I change the order the crash does not appear to follow or precede a particular sound file - it just happens at some other point - usually within 3 trials.


Hi John,

as pointed out here, one solution would be the following:

  1. Open “C:Program files (x86)\Psychopy3_PY2\lib\site-packages\psychopy\sounds\” with administrator rights
  2. Search for self.sounds.remove(thisSound) and remove .sounds
  3. Save the file and enjoy


Hi, Thanks for the suggestion. Unfortunately, it does not seem to have had any effect.
Just to check, the line, once edited, should say self.remove(thisSound)
Does one have to relaunch Psychopy or anything?


Hi John,
yes, the line is correct and you should relaunch PsychoPy for it to take effect. Sorry I didn’t mention that.

That’s don the trick!
Many thanks,