The unknown resource issue: default.png

We alway have unknown resource errors when the experiment includes a Loop or Conditions with csv. file. We see the following error “when getting the value of resource: default.png”. But I don’t use this file name at all. Only when online experiments are conducted, this error arises. We use the latest version of psychopy3. Note that there is no problem when we don’t use csv file to show multiple images in the experiment. Is this a path problem?

1 Like

error

I’ve discovered this issue with the latest version of PsychoPy, when images are set to update Each Repeat of Each Frame. A fix is on it’s way but in the meantime you could either upload an image called default.png (you might need to also add it as an additional resource) or set your images to constant and then update them using a code component in Begin Routine.

Ah I see what this is… Essentially, if an :image: Image component’s image param (or a :movie: Movie component’s movie param, a :sound: Sound component’s sound param, etc.) is set to update each frame or repeat, then when the Image (or Movie or Sound or etc.) object is created it’s given a “safe init” value, just so the object has a value & it isn’t going to break anything. In 2023.1.0 we added some stimuli (default.png, default.mp4, default.mp3) to the server so that these are always available, so we now use these as the “safe init” value.

Problem is, if they’re requested as a safe init rather than being directly specified, they’re not picked up by the resource detection when the JS file is written, so aren’t initialised! This is easy to fix - I just need to add a few lines to check for safe inits and note to load default.png, default.mp4, etc. as needed.

You can expect a fix for this in 2023.1.1, I’ve got it written and just kicking the tires now, but in the meantime you can either:

  • Roll back to 2022.2.5 and wait for the fix, if your experiment doesn’t rely on any new features from 2023.1.x

or…

  • Use a :resource_manager: Resource Manager or :static: Static Period component to handle all your stimuli (and include “default.png” in the list of stimuli!). These components essentially tell PsychoPy “rather than trying to figure out what to initialise, initialise these files” - as the bug is in PsychoPy figuring out what to initialise, doing this avoids the bug altogether. You can find more info on these components here and here.

I unfortunately still have the same problem in 2023.1.3. Uploading an image called default.png or using resource manager didn’t help. Do you have any other idea on how I can solve this problem?

What does the rest of your experiment look like? Do you get the same error about failing to load resource?