Pavlovia Error: Unknown Resources

I am trying to pilot my online study, but have run into the Unknown Resources error message upon the step in the experiment where it loads my first auditory stimulus. Upon consulting some other similar questions on the forum, I think it might have to do with the file extension. However, I am unsure how to go about doing this: should I change the filepath associated with the stimuli somehow, and if so, to what?

Here is the link to my project:

Thank you!

The issue is likely with the flac files, but not necessarily the file extension. I think the issue is just that you made loading all the audio files contingent on passing the headphones check. Rather than that, I would design your experiment such that it loads ALL the audio (including what it needs for the headphone check) prior to doing the headphone check, and simply use code to redirect to an exit screen if they fail the headphone check, rather than making the PsychoJS start function contingent on passing the headphone check in the first place.

2 Likes

Thank you for your reply. How would I change the code in order to load all audio files at once? Is it a matter of moving the later audio files up before the sound check code, concurrently with the sound check audio files?

Thank you for your reply. I replaced the code including the audio check with the HTML JS script exported directly from PsychoPy Builder, but still got the same error message. It is not the case that the slashes are wrong or the capitalization is inconsistent either…what else could be the issue?

I think I see a possible solution. In the builder, open the Experiment Settings (the gear icon) and go to the “Online” tab. There is a big box at the bottom of this tab called “Additional resources”. Add all of the FLAC files to this field using the browse/add buttons on the right.

In general, the way Pavlovia studies work is that they load all of the files needed for the experiment once at the very beginning based on a list of “resources”. Most of the time, these resources are identified automatically by the builder. However, when there are some files that are only referred to in code elements, it might not identify them. This “additional resources” field is a way around that, by directly telling PsychoPy that these files should be loaded with everything else.

If the FLAC files refer to the audio files in the audio check, they load well and can be used. The other wav files in the actual experiment are all already added to the additional resources tab in Builder, and they are the ones that are causing the error message (unknown resource). I have checked and the filepaths of the files included in an excel has also been added to the online additional resources tab in builder settings.

Ah, you shouldn’t put the full file path in the excel files, just put the filename. The full file path is specific to your personal computer, but on the Pavlovia server, the audio files are in the same folder as the experiment script. So, you should just put, e.g., “AFR-F3-Cut.wav” in the excel file instead of the full path and it should stop giving you the error.

1 Like

Thank you so much! It works now : )

Thank you so much! I changed the name of one in just the practice to just the file, and it ran well. However, after adding in the other practice files, the issue seems to persist?

I’m afraid I have no idea why it would do that. I see that it’s in the loaded resources and the excel file looks correct, so it should be loading. You might try de-activating and re-activating the experiment in Pavlovia to see if it just needs to update an internal cache or something.

Try an incognito tab to check for cache issues.

https://psychopy.org/online/psychoJSCodingDebugging.html