"Unknown resource" error despite resource being present

URL of experiment: Kait Clark / GS_exp_E_v1.9 · GitLab

Description of the problem: When I run the experiment, eventually this error appears:
"Unfortunately we encountered the following error:

  • when setting the image of imageStim: image_13

  • when getting the value of resource: cnh_duckrubber.jpg

  • unknown resource

Try to run the experiment again. If the error persists, contact the experiment designer."

The resource (cnh_duckrubber.jpg) is indeed available, and I’ve tried replacing it.

Also other versions of this experiment (with the same conditions file and same image) work just fine.

When I’ve had missing image files before, the experiment won’t even run because calls the error when it tries to load them in the beginning. In the case, all the resources load just fine and the experiment starts, but during the experiment, it crashes when it tries to call cnh_duckrubber.jpg


I started your experiment while having the network panel open in devtools (see Thomas Pronk / tutorial_js_network_error · GitLab). I noticed that cnh_duckrubber.jpg, while it is in your gitlab, wasn’t downloaded. Perhaps there is something different with the way you set this stimulus?

Also, I noticed your pictures are quite large; might help to make them a bit smaller by reducing the resolution or using higher compression.

Best, Thomas

Thanks for the reply Thomas!

There’s nothing different about the way I set the stimulus - all of the image file names (including cnh_duckrubber.jpg) are in conditions_exp_images_2.xlsx so I am really at a loss as to way this one isn’t being downloaded.

No prob. I think I found something. Looking at your JS file, I noticed that duckrubber isn’t in the list of resources. See this line. Next. I downloaded your repo and re-generated the JS (by pressing <ctrl>+E). After that the duck was in there.