# "Unknown resource" error despite resource being present

**URL:** <https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341>\
**Category:** Online experiments\
**Created:** [June 3, 2021, 7:56pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341 "2021-06-03T19:56:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kait.m.clark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/kait.m.clark/32/6263_2.png) [@kait.m.clark](https://discourse.psychopy.org/u/kait.m.clark)\
**Post date:** [June 3, 2021, 7:56pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341/1 "2021-06-03T19:56:57Z")

</div>

URL of experiment: [Kait Clark / GS\_exp\_E\_v1.9 · GitLab](https://gitlab.pavlovia.org/kaitclark/gs_exp_e_v1-9)

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.

> **[Kait Clark / GS\_exp\_E\_v1.9](https://gitlab.pavlovia.org/kaitclark/gs_exp_e_v1-9)**
>
> GS\_exp\_E\_v1.9

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

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 4, 2021, 2:15pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341/2 "2021-06-04T14:15:44Z")

</div>

Hey!

I started your experiment while having the network panel open in devtools (see [Thomas Pronk / tutorial\_js\_network\_error · GitLab](https://gitlab.pavlovia.org/tpronk/tutorial_js_network_error)). 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

---

<div class="post-metadata">

**Author:** ![kait.m.clark](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/kait.m.clark/32/6263_2.png) [@kait.m.clark](https://discourse.psychopy.org/u/kait.m.clark)\
**Post date:** [June 7, 2021, 7:40am UTC](https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341/3 "2021-06-07T07:40:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [June 7, 2021, 11:05am UTC](https://discourse.psychopy.org/t/unknown-resource-error-despite-resource-being-present/23341/4 "2021-06-07T11:05:15Z")

</div>

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](https://gitlab.pavlovia.org/kaitclark/gs_exp_e_v1-9/blob/master/V1.9_E.js#L115). Next. I downloaded your repo and re-generated the JS (by pressing `<ctrl>+E`). After that the duck was in there.
