psychopy.org | Reference | Downloads | Github

ReferenceError: colors is not defined

URL of experiment:
https://run.pavlovia.org/mobinmr7/wmct/?__pilotToken=6512bd43d9caa6e02c990b0a82652dca&__oauthToken=e67a33b0556bcfc8b4f74177ffba116947999e07c1f6ff31965066170b122686

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:

“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