URL of experiment: https://pavlovia.org/run/huppfi/eating2/html/
Description of the problem: When running the experiment following Error shows up
Is the way I access my files wrong?
URL of experiment: https://pavlovia.org/run/huppfi/eating2/html/
Description of the problem: When running the experiment following Error shows up
Is the way I access my files wrong?
I believe you are receiving this error because your prime
image stim is undefined when you create your image component. You may want to put a base image file in there, and then this will be overwritten when you set the image at the start of each routine.
So should I not do it like this? I currently have a variable primeimage that gets set to whatever Image I need.
Should I just put in a base image and then overwrite it with prime.setImage() ?
Actually, I think this relates to a resource problem. Are you sure your images are being uploaded to Gitlab and available in the destination file?
Hmm I think I might know what is happening. If you take a look at my gitlab https://gitlab.pavlovia.org/huppfi/eating2/tree/master/
you can see that I have a stim folder with all the files.
But the .js file is here: https://gitlab.pavlovia.org/huppfi/eating2/tree/master/html
Where theres a different stim folder. Maybe I need to go back 1 level and then assign the picture. So “…/stim/disgustprime/xxx.bmp”
I cannot actually see your repo there, it does not seem to exist. Try putting your images in the resources folder that is in the same directory as your javascript and html, rather than the parent directory.
I think this one is the old problem of backslash in filenames.
stim\disgustprime\RF_042.bmp
You want to use / (which is recognised on all computers) rather than \ (only recognised on Windows).
I am using forward slashes. Though I see now that in the screenshot it looks weird sorry.
I had thought that too, but the filepaths all use ‘/’. Yes, the screenshot looks like “\” are used.
I recreate this error when I have not put all of my images in the resources folder. Instead of having them in the current working directory (i.e., where the JS and HTML experiment is saved), move your images into your resources folder that should have been created on export.
Thank you! That was the solution!
I have the same problem when I run my experiment for local debugging mode and the images are in the “html/resources/img/even_choice_4.png”
This is my experiment : GitHub - Aliadelik07/mnm_experiment: delay factor extractor which runs correctly offline.