URL of experiment: Sign in · GitLab
Description of the problem: When I’m piloting the experiment, I keep getting the same error “Unfortunately we encountered the following error:
• when setting the image of ImageStim: image_4
• when getting the value of resource: instructions_raph_1.png
• unknown resource
Try to run the experiment again. If the error persists, contact the experiment designer.”
The files are in my experiment folder, the problem seems to be that pavlovia thinks I don’t have any resources because when I click on piloting the “all resources downloaded” bar is already completed (fully grey)
I do use resources manager, I put it at the beginning of the experiment to make sure it downloads the instructions images first. But nothing seems to work.
Any helps would be greatly appreciated.
Hello,
I can’t access you project. The link points to a 404-page (not found).
When you log in to your Pavlovia account and go to your repository via view code, do you find your stimuli anywhere in the repository? The error message indicates that Pavlovia is looking for instructions_raph_1.png in the same folder where the javascript code for your experiment is stored.
Best wishes Jens
Hello
For example, I have an experiment in which I store images, p1a.jpg, p1b.jpg. maske.png, etc., in a folder called Stimuli. I refer to these stimuli via a condition-file, see below
As you can see, I specify the relative path to the stimuli in the condition file, Stimuli/p1a.jpg. PsychoPy is smarter than PsychoJS. PsychoPy looks for a file in the experiment folder or its subfolders. PsychoJS cannot do this. It needs the relative path to the file.
So, if your instruction.png is in resources, you need to specify the relative path to it, e.g. resources/instruction.png
If you are using a current version of PsychoPy don’t use an html-folder. It is obsolete nowadays.
Best wishes Jens
BTW. Simple screen shots are most of time much better than videos.
Hello,
Thank you for your help. I’m using an older version of PsychoPy (2022.2.4) which still uses the html folder to store the JavaScript files for online experiments.
Do you think the problem comes from the resource manager I’m using? I’m not sure how to use the condition-file in this instance.
The first routine in my experiment contains a resource manager with the instructions images and other files that are needed to properly display my instructions.
Then, I have the instruction routines (i.e., instruction & instruction_2 where I implemented another resource manager that should download all the stimuli needed to run the experiment.
I specified the relative path of all my files for PsychoJS.
Best,
Raphael
Hello,
According to the channelog Changelog — PsychoPy v2023.1.2 PsychoJS stopped using the html-folder in version from 2020.2.
Best wishesJens
Hello,
Given that we are using psychopy and pushing it directly to pavlovia should I have to specify the path like you described it? Because I never had to do this for my other experiments…
Best,
Raphael
Hello
you should set a relative path to your stimuli matching your local condition. Do not use html as a path. Delete it from Experiment Setting - Online and delete it from the local experiment directory.
Best wishes Jens