Error setting/finding image

I’ve been encountering the following error for my experiment (code here: Sign in · GitLab).

It seems like either the path to the image is wrong (but I don’t think it is?) or the image file is not an image (it’s saved as a png and I used gimp to export it with certain settings per IOError: Found file but it failed to load as an image - #2 by kevinhroberts).

I do use custom code to get the images into the experiment (because I want to randomly display multiple images at a time), so maybe it is related to that:
for (var i = 0, _pj_a = 8; (i < pj_a); i += 1) {
shapes[i] = [("stimuli/shape
" + i.toString() + “.png”)];

I’m open to other suggestions how to get the images in to the experiment, or other fixes.

Hey @kellycotton, apologies for the late response, were you able to figure this one out in the end? What happens when you open that image on your browser? Looking at the snippet you posted, removing the brackets surrounding the image path might be worth a try, i.e., shapes[i] = 'stimuli/shape' + i.toString() + '.png';. Here to help, s.

I ended up just manually loading in each image (there weren’t that many): shapes = [(“stimuli/shape_0.png”), etc.] and that seemed to fix it.