| Reference | Downloads | Github

ReferenceError: colors is not defined

URL of experiment:

Description of the problem:
Hi community members,

I developed a timed Working Memory Capacity task using PsychoPy Builder mode. It’s perfectly run locally, but when I transform it to Pavlovia, I face the following error:

Unfortunately we encountered the following error:
ReferenceError: colors is not defined*
Try to run the experiment again. If the error persists, contact the experiment designer.”

I can’t figure out where the problem lie.

I really appreciate it if you’d help me with the issue.

Where are you using the variable colours?

Try putting colours = 0 in Begin Experiment

Thanks for the response, it was very helpful.

I realized my problem lied in copying colors as “objects”, while I should have used “copy colors as values”. I changed it to values type and it’s fine now.

1 Like