Unknown resource image error- image file not found

URL of experiment: theodoros kapogianis / testing · GitLab

Description of the problem: i am encountering ‘unknown resources error’. I am working on a larger project, but created this small project to trouble shoot smaller problems one at a time.

I have tried
Use experiment settings (cog image ) > online > +/- keys to add the list of resources your experiment will need (2020.2.6 onwards). .

i have also tried removing the images from the online resources folder and adding them back as some others have suggested.

they are currently just floating in the main folder, but I previously had them in a different folder titled images.

am loading them path of the images through a .csv which has a list that contains all the image file names.

any help would be greatly appreciated.

Hi @theokapo,

you have to remove the ' ' around the single image names in your CSV. Otherwise, the experiment is looking for the file 'object_833.jpg' when it should be looking for the file object_833.jpg.

thanks! @ajus.

turns out that the single quotes around the image paths in the python list was being included as part of the string when being converted to JS. thanks for catching that!

was able to fix by using .replace()

ex.
stim= ‘object_833.jpg’;
console.log(stim);
stim = stim.replace(‘\’‘, ‘’);
stim = stim.replace(’\‘’, ‘’);
console.log(stim);
// ^ had to use .replace() twice bc it only removes one instance of the desired string to be replaced

output:
‘object_833.jpg’
object_833.jpg

best,
Theo

1 Like