psychopy.org | Reference | Downloads | Github

File load error 2

Hi,

I didn’t open the experiment to participants, so I don’t have a URL but the script is attached
(is there a way to share the URL of a pilot-stage experiment?); it was built using Builder and works well offline.
As in this thread, I get a file load error:
32

Except for this file, the error can be scrolled using the mouse and other files appear as well - it seems that all .wav files fail to upload.
I have a suspicion about what the issue is, but I’m not sure how to solve it (and my understanding of JS is very basic): There is no direct reference to any .wav file in the script. The script only refers to list numbers through the settings form ($expInfo[‘List’]+’.xlsx’ to choose a list), which then call sound files ($ItemName+’.wav’ for each trial). It seems that the experiment merely uploads the excel files involved, but doesn’t actually read them.
What strengthens this suspicion is that at the beginning, the sound files wouldn’t upload to git. I added them manually, and now I can see them in the repository, but this new issue arose.

Thank you in advance for any lead!
Si
Covert_pretest.psyexp (44.3 KB)

PsychoPy tries to detect files that are going to be used in your experiment by examining xslx files that you’re loading in the study and looking inside those for further variables that look like file names. In your case that’s failing because PsychoPy doesn’t know how to handle the $expInfo[‘List’]+’.xlsx’ when generating the resource files.

You can manually move them into the html/resources folder though, and resync, and then hopefully the psychojs version will find them

Hi Jon,

Thanks for the answer.
As I said, the files were manually added to the html folder before I encountered this problem. I’ve also deleted the cache of the browser.
Is there another way to do this?
The experiment is relatively heavy: 24 lists, with 200+ sound files in each. So I’m also worried about a solution that would force the participant’s computer to read all the sound files.
Thanks again!

Well, other possibilities

  • are they in the resources folder or in subfolders inside there?
  • maybe psychojs can’t cope with the volume of files if there are indeed 200. Try with a smaller subset to check
  • maybe the wav files don’t play in the browser? For movies avi files aren’t permitted but .mp4 and .mov files do play. You could try a subset of files in another format (e.g. mp3 or ogg). Actually that would be a big benefit to participants anyway - all the files do indeed get copied to the participant’s computer so you want them to be in a compressed format (wav files are more MB per second than compressed formats)

cheers,
Jon