ReferenceError: Can't find variable: thisExp

OS (e.g. Win10): macOS 10.14.6
PsychoPy version (e.g. 1.84.x): 2020.1.2
Standard Standalone? (y/n) If not then what?: y
**What are you trying to achieve?: run experiment online

**What did you try to make it work?: checked all code components

What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.

Dear all,

I keep on getting the following annoying error when I try to run the experiment on Pavlovia: ReferenceError: Can’t find variable: thisExp

I’ve read on the forum that it might have to do with the translation of the Python code into JS. In fact, the experiment works flawlessly when I run it on my local computer. I get the error only when I try to run it online.

Weird thing is that I never call the variable “thisExp” in my code components. Also, I tried to remove all of them and the online experiment still did not work.

Any ideas?


Have a look for how to solve this in my crib sheet (pinned post) by defining thisExp in code_JS

Amazing, it worked! Thank you so much

1 Like