# ReferenceError: Can't find variable: thisExp

**URL:** <https://discourse.psychopy.org/t/referenceerror-cant-find-variable-thisexp/15656>\
**Category:** Builder\
**Tags:** online, pavlovia\
**Created:** [August 12, 2020, 9:47am UTC](https://discourse.psychopy.org/t/referenceerror-cant-find-variable-thisexp/15656 "2020-08-12T09:47:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![treelen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/treelen/32/35416_2.png) [@treelen](https://discourse.psychopy.org/u/treelen)\
**Post date:** [August 12, 2020, 9:47am UTC](https://discourse.psychopy.org/t/referenceerror-cant-find-variable-thisexp/15656/1 "2020-08-12T09:47:45Z")

</div>

**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?

Thanks!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [August 12, 2020, 7:24pm UTC](https://discourse.psychopy.org/t/referenceerror-cant-find-variable-thisexp/15656/2 "2020-08-12T19:24:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![treelen](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/treelen/32/35416_2.png) [@treelen](https://discourse.psychopy.org/u/treelen)\
**Post date:** [August 13, 2020, 8:24pm UTC](https://discourse.psychopy.org/t/referenceerror-cant-find-variable-thisexp/15656/3 "2020-08-13T20:24:32Z")

</div>

Amazing, it worked! Thank you so much
