# Unknown resource error during online experiment

**URL:** <https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [March 9, 2022, 11:58am UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882 "2022-03-09T11:58:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 9, 2022, 11:58am UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/1 "2022-03-09T11:58:58Z")

</div>

URL of experiment:  
[Even Day [PsychoPy] (pavlovia.org)](https://run.pavlovia.org/Laurence_Lough/even-day-trial/)  
Description of the problem:  
Hi all,

I’m having an issue where an error screen pops up displaying “unknown resource”. I have been through almost all previous forum posts on the issue and followed all the steps, such as deleting and uploading the project again after deleting local files; adding resource files to the experiment → online tab → additional resources section; changing the internal code to manually load the files using psychoJS.start; etc. but nothing seems to work.

Anyone got any ideas on how to help? I’ve included a screenshot below:

 ![unknown resource](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/d/3/d361df18c23bb713341211ff7da5bb6f3c37c2e4.png)

Thanks in advance.

---

<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:** [March 9, 2022, 9:57pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/2 "2022-03-09T21:57:14Z")

</div>

You have given a location for the spreadsheet on your local computer. The path needs to be relative to the experiment file (and in the same folder or a sub-folder).

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 10, 2022, 11:49am UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/3 "2022-03-10T11:49:51Z")

</div>

Hi,

Thanks for the reply. This makes sense but I’m not sure how to tell the experiment not to use the local path. How would I go about getting it to use the relative path instead?

---

<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:** [March 10, 2022, 4:05pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/4 "2022-03-10T16:05:51Z")

</div>

Please could you show a screenshot of how you are addressing your condition file.

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 10, 2022, 5:58pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/5 "2022-03-10T17:58:26Z")

</div>

So in the builder view, the conditions file is addressed using a loop function, the path of which is specified at the above screenshot in the error:

 ![condition loop](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/1/e193c7e309f9ed20b60cdb02b29fb9e46e37ead4.png)

In the code view, the conditions (and image) files are addressed using the psychoJS.start function to try and load them:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/9/7/976d2b8df9a52d7b2b9616f321d10fe4a37cf4a9.png)

I hope this is what you were looking for - sorry, this is my first time using coding software…

---

<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:** [March 10, 2022, 11:17pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/6 "2022-03-10T23:17:56Z")

</div>

Try reconnecting your spreadsheet. I find that the full path appears if I connect a spreadsheet before saving the experiment for the first time. That conditions field must not contain a reference to a local drive.

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 11, 2022, 12:22pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/7 "2022-03-11T12:22:19Z")

</div>

Hi,

I’ve tried reconnecting the spreadsheet - the path in the loop now looks as follows:

 ![new path](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/2/e2dc01400c829df4b3977cc02a646179ab8f132d.png)

Unfortunately, the error still remains the same. I’ve deleted the project and pushed the new files across again so the index.html has all the new project instructions, etc. Is it because the project is still looking in a non-existent C: drive, despite the fact that I have now changed the conditions path so there is no reference to a C: drive?

---

<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:** [March 11, 2022, 1:00pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/8 "2022-03-11T13:00:18Z")

</div>

When you synchronise changes to your experiment, you will only see those changes online if you clear the cache (using Ctrl-F5, Ctrl-Shift-R or equivalent). If this does not work, for example because you have made a change to a spreadsheet rather than the experiment file, use an incognito browser tab. A participant will not need to do this, so long as they have not already tried a previous version of your experiment.

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 11, 2022, 1:48pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/9 "2022-03-11T13:48:16Z")

</div>

Great! This solved the issue, thank you so much!

The problem is now, this seems to pop up at random moments without explanation and I have no idea what it means.

 ![nonsense](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/c/c/cc21aa98aefb04491854ac944056c9ecc181faa2.png)

---

<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:** [March 11, 2022, 1:49pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/10 "2022-03-11T13:49:01Z")

</div>

Don’t use image as a variable name

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 11, 2022, 2:45pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/11 "2022-03-11T14:45:31Z")

</div>

Sorry, by ‘variable’ do you mean change the component name in the builder view to something different? Or change something in the Excel spreadsheets? None of my column headings in the spreadsheet contain the word “image” but the path to them involves the path “images/…”

 ![spreadsheet](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/a/1/a1757b7bfc8fe3d24fbd1afeaec24cfc28aa86df.png)

---

<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:** [March 11, 2022, 2:53pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/12 "2022-03-11T14:53:12Z")

</div>

Using an images folder is fine.

If your image component called image is set to $cue\_file then the issue may be blank rows at the bottom of your spreadsheet.

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 11, 2022, 4:19pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/13 "2022-03-11T16:19:21Z")

</div>

I can confirm that the image component is set to $cue\_file. I’ve updated the spreadsheets, ensuring that all data is deleted and the blank rows and columns have been deleted, but it seems the error is still persisting, even after clearing browser cache, etc.

Any other ideas?

---

<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:** [March 11, 2022, 11:05pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/14 "2022-03-11T23:05:35Z")

</div>

Try an incognito browser tab

---

<div class="post-metadata">

**Author:** ![l\_day](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@l\_day](https://discourse.psychopy.org/u/l_day)\
**Post date:** [March 13, 2022, 8:16pm UTC](https://discourse.psychopy.org/t/unknown-resource-error-during-online-experiment/27882/15 "2022-03-13T20:16:10Z")

</div>

Hi,

I managed to solve the issue. I believe the problem lay with the actual image files I was using. I tried a bunch of things at once, but essentially:

1. I converted all images to .jpg files
2. Made sure to include underscores in all file names
3. Deleted the project and conditions files and remade both from scratch
4. Included the fix from before (not including a C: path) and am pleased to report, everything now works great.

Thanks for all your help!
