psychopy.org | Reference | Downloads | Github

Can't find sound files


#1

OS: Windows 10
PsychoPy version: 1.84
Standard Standalone? (y/n): yes
**What are you trying to achieve?:

The programme I’ve built can’t find the specified sound files, even though they’re in the same folder as the Excel file I’m using. I get the error message:

“TypeError: Could not open sound file Train.wav using pyo; not found or format not supported.”

I know .wav works because the same programme using a different Excel file and folder of stimuli works just fine, but with this Excel file and stimuli - absolutely nothing. I’ve tried putting the full file location into the Excel file with the same result, so I’m a bit stumped how else to help PsychoPy find the file.

It is a relatively stimulus heavy experiment I’m going to be running (62 trials: one sound file and 4 image files for each trial) and I wondered if the sheer bulk was causing problems?

If anybody could offer any insight, that would be great.

*Edit: having played around some more, if I take the sound element out then the images will load fine so it’s something about the sound files particularly that it’s having difficulty with.


#2

PsychoPy looks for files relative to the experiment (.psyexp) file, not the Excel file.


#3

Ah, okay - the way it was explained to me was that it was around the Excel file, not the .psyexp file. Unfortunately, they’re all in the same folder still so I don’t think that’s the problem, but thanks for the suggestion.


#4

Try a sound component with a fixed filename (e.g. Train.wav) rather than using a variable from the conditions file. That can help isolate issues.

e.g. do you have extensions showing in Windows? If extensions are hidden, is is possible that what appears to be Train.wav is actually Train.wav.wav


#5

So, while looking into your file extension name suggestion, I noticed that the files were registering as having been recorded on a different computer, even though they hadn’t, and being blocked from use. Not sure why, but re-recording in a different programme has them registering properly and everything, so thanks for the prompt!


#6

I had a similar problem and noticed the issue was with the way I had recorded the sound file. A stereo recording did not load (even thought it was a .wav type document also). It only worked once I recorded mono sound. Does that sound logical?
Might be helpful to someone with the same issue.