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?