ReferenceError: image_MASK is not defined

Description of the problem: After uploading from Builder to Pavlovia I have an error “ReferenceError: image_MASK is not defined”, where image_MASK is an image. There are several images and there is also a code for each frame “image_ita_mask.opacity = image_ita_mask.contains(mouse_ita)”. Currently, the images are “set every frame”; I also tried “set every repeat” and “constant” ,although there is no loop.

Hi There,

Where is “image_MASK” referred to in your experiment? I don’t see it references in that particular code component. Is it possible you have used the word “image_MASK” both to name an image component and as a column header in your spreadsheet? or anywhere else this variable name might have been used twice?


Dear Becca, I am so happy to hear from you!

I do not understand where image_mask comes from. All the pictures come from here Sign in · GitLab
(the experiment is called LLAMA_B). I didn’t create any variables called image_mask.

I would really appreciate if you could guide me in solving this problem.

Hi There,

For us to view those files please can you make your project public?


Hi Becca,

I have made it public.

I notice that you have lots of experiments in sub folders of

Each experiment should be in a unique folder, not in sub folders of langprof

@wakecarter, langprof is the only experiment. Subfolders are for the routines in the experiment and some unused data. I deleted all psyexp files and the folders with the data not used but the same error persists.

As per Corsi demo_online_Python to JS_syntax error - #4 by Becca you have a problem because you have a Python syntax error in code_matrix.

The offending line is for label, block in blocks.items(): which doesn’t translate automatically.

In the original Corsi demo this component is set to both and the JS side has:

// initial state
blkIndex = 0;
nextSwitch = blockDuration;
doingResponse = false;
currBlock = undefined;

// store blocks as a dictionary (to switch between name/object)
blocks = {};

// Create grid of locations with jitter
let xGrid = [-.3, 0, .3];
let yGrid = [-.3, 0, .3];
let locations = [];
for (let x in xGrid) {
    for (let y in yGrid) {
        locations.push([xGrid[x]+Math.random(2)*.1 -.05, yGrid[y]+Math.random(2)*.1 -.05]);

// Shuffle locations
for (let rolls in blocks) {
    locations = locations.sort(function() { return 0.5 - Math.random()});
var counter = 0;  // location index

// give blocks a new set of random locations
for (let items in blocks) {
    if (blocks[items].hasOwnProperty('pos')) {
        blocks[items].pos = locations[counter];
        counter = counter + 1; 
    if (blocks[items].hasOwnProperty('fillColor')) {
        blocks[items].fillColor = new util.Color('white');
        blocks[items].lineColor = new util.Color('white');

sequence = ["blk1", "blk2", "blk3", "blk4", "blk5"];
respSequence = [];


psychoJS.experiment.addData("respSequence", respSequence); 

in End Routine