# Resource file cannot be found in repository

**URL:** <https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [December 13, 2023, 12:00am UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896 "2023-12-13T00:00:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Roger](https://discourse.psychopy.org/u/Roger)\
**Post date:** [December 13, 2023, 12:00am UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896/1 "2023-12-13T00:00:53Z")

</div>

URL of experiment: [Cave\_v000007 [PsychoPy]](https://run.pavlovia.org/rogerdunn/cave_v000007)

Description of the problem: There are several troublesome discrepancies between the program as run in PsychoPy and in Pavlovia but the simplest one is that an image file (“purple\_bar.png”) goes missing. The error is:

_" Unfortunately we encountered the following error:_

\*\* when setting the image of ImageStim: image\_unsig\_TL\*  
\*\* when getting the value of resource: images/purple\_bar.png\*  
\*\* unknown resource\*\*"\*

purple\_bar.png is in the images folder in the repository along with all the other stimuli that are used successfully.

The other problems are with image placements and, more importantly, contingencies. I am hoping that identifying the simple problem with purple\_bar.png might lead to solving the other problems.

Thank you for this wonderful forum. This is my first attempt at Pavlovia and I have learned a lot from the problems solved for others.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 13, 2023, 9:40am UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896/2 "2023-12-13T09:40:39Z")

</div>

Try adding purple\_bar.png as an additional resource under Experiment Settings / Online.

It looks like a fun study. For your other issues I would break them down into:

1. What currently happens.
2. What should happen.
3. What code you have used so far for this aspect.

Some issues may be solved by moving the code components to the tops of the routines, if they aren’t already there.

---

<div class="post-metadata">

**Author:** ![Roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Roger](https://discourse.psychopy.org/u/Roger)\
**Post date:** [December 13, 2023, 11:48pm UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896/3 "2023-12-13T23:48:40Z")

</div>

That worked for the purple\_bar file. Thank you.

The other problems persist but I will try putting the code in various positions before getting back to you with the details. The top or bottom of the routine doesn’t seem to help but maybe other positions will.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 14, 2023, 12:04am UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896/4 "2023-12-14T00:04:50Z")

</div>

It sounds like the code position isn’t the issue. Please start a new thread with details of your next problem.

---

<div class="post-metadata">

**Author:** ![Roger](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Roger](https://discourse.psychopy.org/u/Roger)\
**Post date:** [December 14, 2023, 12:06am UTC](https://discourse.psychopy.org/t/resource-file-cannot-be-found-in-repository/37896/5 "2023-12-14T00:06:49Z")

</div>

Will do.
