Unknown Resource - Image File

URL of experiment: Mennefer Blue / Experiment · GitLab

Description of the problem:I’m getting this error whenever I try to start my experiment:

I’m using / instead of . And I made sure the images were in the resource folder.

You are trying to tell the experiment to access files from the C: drive on your personal computer. That isn’t going to work, regardless of what flavour of separator you use: remember, this experiment is running on a remote Linux server. It doesn’t have a C: drive at all, and certainly not access to the C: drive on your personal computer.

Switch to using file paths that are relative to the folder where your experiment is, not absolute paths specific to your computer and operating system. That way, things will work regardless of whether the experiment is running locally or online.

But I have tried that. I’ve changed the file path to /Senior Project/FG/FG8.jpg instead of C:/Users/mennefer.blue/Senior Project/FG/FG1.jpg
It did not work.

Your paths should look like, for example, FG/FG1.jpg because, relative to your experiment the file FG1.jpg is in the FG folder


I’m getting an error of this type as well on the online version and can’t understand what I’m doing wrong… the script runs fine locally.

I have images (for the online version) placed in:

this folder contains 4 subfolders:
Happy, Sad, Angry, Fear

each folder contains jpg files labelled as:

the folder and filename are drawn from an excel file, with columns ‘emotion’ (indicating folder) and ‘file’ (indicating image)

So for example on a given trial I might load image ‘file’ = 4.jpg from folder ‘emotion’ = Angry

in the Js script this is specified as imgPath = (((“Images/” + emotion) + “/”) + file);

When running online:

In the console in my browser I see this path printed out as:
image path: Images/Angry/4.jpg

But I get an error saying:

  • when setting the image of ImageStim: testImage
  • when getting the value of resource: Images/Angry/4.jpg
  • unknown resource

I aslo checked on gitlab, and I do see the file under:

I’ve done this before… I could be burnt out and not noting something really obvious… but I just can’t understand what’s wrong! Can someone please explain what I’m doing wrong?



Hello everyone,

I’ve unfortunately still not managed to figure out what’s going on.

…at this point wondering if this is due to a new feature of psychopy (2020.2.3) that isnt’ clear to me.

The reason I wonder whether this is due to a new feature, is because for the 1st time using psychopy, when I exported the exp to pavlovia, psychopy did not automatically create an html folder with a copy of my resources. I had a look around on discourse and found this comment: “PsychoPy now doesn’t create a html folder because essentially this was duplicating all the required resources, and using lots of space on pavlovia (because there were the resources outside and inside of your html folder!).” PsychoPy Builder not creating HTML folder

I created one anyway, due to the unknown resource error (settings>online>output path = html), and placed my images in the resources subfolder. However I still get the error. Note that now on Pavlovia I have two copies of my images, one in the Images subfolder (as run locally) and one in html/resources/Images: the folder structure is identical to how I’ve always set things up for online studies in previous versions of psychopy…

I tried clearing the cache, erasing the html folder and having it re-create when uploading to Pavlovia… nothing!

Can anyone please help me with this? I’ve been stuck on this for several days!!!


Hi Nicola,

I just ran your experiment and didn’t run into any errors (although I think only 20 trials were presented?), please can I confirm if you have resolved this issue?

Essentially what pavlovia will do is this:

  1. is there a folder called ‘html’? if yes then look for a sub folder called resources and check the content of that for resources.
  2. if there is no html folder (as you correctly identify is the case for recent versions of psychopy) use the files that are listed under experiment settings > resources (you can add files using the + and - icons next to the empty box.

Please can I check if you have tried adding image files to that box?


Hi Becca,

thanks so much for looking into this!
I still can’t run it… this is very weird.

Unfortunately we encountered the following error:

  • when setting the image of ImageStim: testImage
  • when getting the value of resource: Images/Angry/2.jpg
  • unknown resource

This is what I tried:

  1. I first tried re-running as is, clearing cache etc. (since you managed on your end). Note that since I experienced this error on my 1st upload, I have “Images” in my experiment folder and also added them to an html/resources folder. As mentioned the html was not automatically created when exporting, so I specified “html” in settings>Online>Output Path, and manually copied “Images” into the resources folder. Locally this runs while online it doesn’t. If I check on gitlab, I see both copies of “Images” files. I’m not sure which one pavlovia is supposed to read (Images in the main folder, or html/resources/Images), but they are both present so it shouldn’t matter.

  2. I tried doing what you suggested: I tried adding all images in settings>Online>additional resources. I couldn’t specify the whole Images folder, so I added each individual .jpg inside the 4 subfolders (Angry, Happy…) I have inside Images. I uploaded this, but I still get the same error. Note that I tried doing this with both of my copies of Images (Images in the main folder, or html/resources/Images), but nothing.

  1. How should this in theory work in v2020.2.3? Since it no longer creates automatically the html, would the online version in theory read by default the same resources used by psychopy when running locally (i.e. “Images” in the main folder)?

Thanks so much!!!


I had something like this when I accidentally added resources from the folder of a different experiment rather than the one I was editing. I would recommend deleting those additional resources and then adding them again.


I tried doing that, removing the files in Additional Resources, saving, then re-adding them… still nothing

I find it really weird that others can run it on Pavlovia… I tried with another browser, to no avail


Hi Nicola,

One thing is that I am running psychopy version 2020.2.8 - but I don’t think my psychopy version should influence my ability to run your exp in the browser (since that is independant of my psychopy!). To clarify - this is my copy of your task - I made no edits, does this function as you expect? https://run.pavlovia.org/lpxrh6/expressioncategorizationv2/html

Also you mentioned trying with other browsers - I am running in chrome at the moment, which browsers have you tried there? (it sounds like you have run most of the checks I would suggest!)


Hi Becca,

this is always getting weirder. Your version works. It just doesn’t make any sense.

I notice that in your case I see that resources are being loaded by the progress bar. If I run my version, the progress bar instantaneously fills, so clearly no resources are being loaded, even though I clearly see them on gitlab.

The other thing I notice in your version is that on top of the loading bar there is a ‘open science tools’ logo… What is that? I don’t see this in the loader on my end.

I tried chrome, edge and firefox… so it’s not a cache issue or something browser specific.

I guess I’ll try erasing the gitlab project and re-upload. Just in case I could try updating psychopy as well. As a last resource I’ll recreate everything from scratch.

Just so I understand how this in principle should work on the latest version of psychopy: is an online folder (html) no longer required? So basically I just have my images in the main experiment folder, and the online version would automatically search for resources there, or must I point to these in the Additional Resources field? It just seems more convoluted now…

I hope I sort this out quickly, this had to be a piece of cake…

Thanks so much,



I updated psychopy, deleted the gitlab project, re-uploaded without changing anything… And now it works. No idea what went wrong, but at least it’s running now as intended!