Error: ImageStim is neither an image nor a video (works locally, not online)

URL of experiment: invertedbodiesexp_cb1_10 [PsychoPy]

PsychoPy version: 2022.2.3

Description of the problem: I have an experiment, made using the Builder, that runs locally (on my Mac) perfectly fine, but online it won’t display the images.

An image is displayed and a participant presses 1 or 0 to respond to it. In the image component Image is set to $image which refers to an excel sheet with file paths to all the images to be displayed, and it’s on set every repeat. It works locally fine.

I managed to get the experiment online. It goes through the instructions fine. One of the instructions routines displays an image and that works fine (in the Image component for that, Image is set to 1 individual image in the same folder as the experiment, keyboard.jpg).

When it starts the first routine with experimental stimuli, it crashes with the following error message:

The experimental stimuli are stored in folders, rather than in the same folder as the experiment. This is the only difference I can think of compared to the keyboard.jpg image which works. The excel sheet contains file paths to the images.

What’s even more confusing is that yesterday this experiment worked online! The only thing I’ve changed is adding several instruction routines.

Any ideas?

Thank you! Lydia

I suspect you have both a variable “image” and a component “image”. Could that be? Because the error looks like PsychoJS tries to read a whole component with the name “image” where you actually just want it to take the value of a variable called image.

A possible explanation for the introduction of this error by the instruction routines would be that the component “image” is part of these instruction routines.

Hope that helps!

Use simple terms for variables, since they may already be in use by PsychoPy. Variable names to avoid are: class, core, image, index, Length, list, Object, Number, round, sound, Symbol, t, thisTrial, trials, util, visual.