ImageStim resources not found in Pavlovia

URL of experiment: Pavlovia

Description of the problem: png images are not being found in pavlovia task (see error image)

I define some images at the beginning of the study in an initial code component in BeginExperiment (because they are used throughout in multiple different routines):
octImage = ‘images/octopus.png’;
fishImage = ‘images/fish.png’;
crabImage = ‘images/crab.png’;

Later on, I create image stim and define the image using the names. For example, the bit of javascript related to the error below is the following:

fishIcon_practiceChoice = new visual.ImageStim({
win : psychoJS.window,
name : ‘fishIcon_practiceChoice’, units : ‘norm’,
image : fishImage, mask : undefined,
ori : 0, pos : [(- 0.8), (- 0.35)], size : [0.15, 0.15],
color : new util.Color([1, 1, 1]), opacity : 1,
flipHoriz : false, flipVert : false,
texRes : 512, interpolate : true, depth : -6.0

Although the task works fine in psychoPy locally, once it’s uploaded on pavlovia I get the following error:

Note that the images are not defined relative to a local filepath so this is not the problem. All the resources are in the right place in the pavlovia gitlab folder.

Up until now, I have had no trouble running this on Pavlovia in an almost identical version of the task with a few additional components (but no difference in how I define the image stimuli). For the current problematic version, all I did was duplicate the experiment, deleted some of the later routines, and saved it separately on the desktop.

The only thought I had was whether originally there was a problem because I originally saved the duplication into my github folder which initially caused problems? Although it’s no longer in this folder, could this be relevant?

Hi There,

In your description your images are stored in the file “images” but in the error it looks like the experiment is looking for the folder “resources” - could that be the issue?


1 Like

Hi becca,

thanks for your reply, sorry that was a misleading picture to put in the description because it’s from an attempt to fix the error by changing the ‘images’ folder to ‘resources’ (and changing the file name correspondingly) in case creating a new folder somehow helped pavlovia to find it. Predictably I get the same error either way. Here’s the original error image I should have put:

Screenshot 2021-04-01 at 10.47.31 1

Hi There,

OK please can you make your project public so we can view it.

sorry about that, done!