URL of experiment:
Even Day [PsychoPy] (pavlovia.org)
Description of the problem:
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:
Thanks in advance.
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).
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?
Please could you show a screenshot of how you are addressing your condition file.
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:
In the code view, the conditions (and image) files are addressed using the psychoJS.start function to try and load them:
I hope this is what you were looking for - sorry, this is my first time using coding software…
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.
I’ve tried reconnecting the spreadsheet - the path in the loop now looks as follows:
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?
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.
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.
Don’t use image as a variable name
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/…”
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.
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?
Try an incognito browser tab
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:
- I converted all images to .jpg files
- Made sure to include underscores in all file names
- Deleted the project and conditions files and remade both from scratch
- Included the fix from before (not including a C: path) and am pleased to report, everything now works great.
Thanks for all your help!