Unknown resource error when importing conditions (after updating psychopy)

URL of experiment: MFC_python_coder_OnlineTestSept [PsychoPy]

Description of the problem: I updated my version of psychopy to allow me to use trials.thisN etc. However, I now keep getting the “unknown resource” error when importing conditions when trying the run the experiment online (same problem if I run in debug mode). This experiment works fine offline though and also worked online prior to the update.

Some things I tried:

  • locally, the conditions file is in the same path as the .psyexp file and then is automatically put into the resources file in the html file
  • I have deleted the online experiment and resynced it with the offline one
  • I added the conditions file manually in the builder (under the online tab in experiment setting in the builder)

Any insights would be greatly appreciated.

Thanks a lot,


Full error message:
Unfortunately we encountered the following error:

  • when importing condition: trialConditionsMFCsept.xlsx
  • when getting the value of resource: trialConditionsMFCsept.xlsx
  • unknown resource

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

Hi There,

I think I have encountered this but it is proving illusive to pin down. Out of interest what happens if you delete the loop then sync, then re-add the loop and type the name of the conditions file (i.e. don’t use the file select button)?


@Tegan : I believe that the issue stems from your repository containing duplicates of the necessary files, e.g. index.html, both at the top level and in a html sub-directory. This possibly might have happened when you moved from using a html sub-directory to not using it.
The resources sub-directory in html itself contains a html sub-directory. As a result the pavlovia.org back-end is confused about where to get those resources.

I would suggest that the easiest way forward would be for you to delete the experiment, and create a new one, which you could then sync, from the PsychoPy Builder.
Alternatively, I am happy to sort out the current version on pavlovia.org but you may run into issues again when you make changes to your PsychoPy experiment on your end.


Hi Becca,

Thanks for getting back to me. I tried what you suggested - it didn’t work but it did change the error slightly.

My resource file still isn’t loading (i.e. the grey progress bar at the start of experiment that usually says “all resources loaded successfully” is white with no text). But the error message now says: " * ReferenceError: practiceTrials is not defined". practiceTrials is one of the columns in my conditions file. I’m not sure if that helps at all but wanted to flag in case.

I’ve actually managed to work around the problem by creating a new experiment in the updated builder and just copying everything across from the original experiment. I then created a new project on pavlovia and synced to that. Its a bit clunky and not very efficient but it did fix the problem.

Thanks again for your help,


Hi Alain,

Thanks for your reply. This does make sense as when I synced the project it would try to create an html folder inside my resources folder which was already inside an html folder.

I tried deleting the experiment on pavlovia and creating a new one. I then synced the experiment from the builder to the new experiment on pavlovia (I think this is what you were suggesting). This didn’t work unfortunately. I’m just flagging this in case useful for others who encounter the same problem as I did manage a work around in the end (see my earlier reply to Becca).

Thanks for taking the time to help.

All the best,


I am having the same issues with the unknown resource error message popping up. I’ve tried adding the excel file I’m using in my loop to Experimental settings under “online” add’l resources, I’ve tried updating the javascript with the resources path and I’ve tried deleting the experiment from Github and reloading it and nothing seems to work.

Here is the URL of my experiment (built in Psychopy3 2021.3, used on MacBook Pro): Sign in · GitLab
in case someone wants to look at it and has potential solutions.

Do you (or have you every had) an html folder in this experiment? If so, I would recreate it without html in Experiment Settings / Online.

I did have a html folder that is generated locally and in Github when it syncs with Pavlovia and converts to javascript. The excel spreadsheet is in the Resources folder (subfolder of html). Just now, I deleted the html line from experimental settings and also deleted the excel file from add’l resources in my original experiment just now which still failed to load the resource (didn’t see the progress bar at all).
Would I instead have to recreate the entire experiment in builder instead and them remove the html setting?

I would recommend doing this. Copy the psyexp and resources files to a new folder and sync from there.