psychopy.org | Reference | Downloads | Github

Keeping meeting ValueError: Sound: bad requested frequency 0 when playing sound

Hi everyone. I want to play a list of sounds once a time at the beginning of the routine. But I failed to play the sound since I kept meeting ValueError: Sound: bad requested frequency 0.
OS (e.g. Win10):
PsychoPy version (e.g. 2021.1.4):
Standard Standalone? (y/n) Yes

What did you try to make it work?:
I changed my preference of audio library but it does not work.

What specifically went wrong when you tried that?:
I created the audio list by merging the path and name of audio together.


Then I try to play the sound.
and I came across the following problem.

I’m new to psychopy. I would really appreciate if you can give me some ideas.


This is my sound setting. Hope it may help a bit.

Try print(audio[current]) in a code component to find out what it’s trying to play.

Thanks!! It worked. I finally found I appended the index i instead of the audio name in the list.