psychopy.org | Reference | Downloads | Github

'thisExp is not defined' even if it doesn't appear in the code

URL of experiment: https://run.pavlovia.org/Sysmus/test_25

Description of the problem:
I had to make a change in the JavaScript-code because of an error in the automatic translation. The old error message dissapeard and there was a new one saying: ReferenceError: thisExp is not defined.

Here: ReferenceError: thisExp is not defined error in Pavlovia - Online experiments - PsychoPy
I found that changing ‘thisExp’ into ‘psychoJS.experiment’ might help so I replaced the command everywhere in the code. According to my search function ‘thisExp’ doesn’t appear in the code any more now but when I run the experiment I still get the same error message.

Does anyone have an Idea what might be the reason?

Thank you very much in advance for your response! :slight_smile:

I think it does appear in your code

    //------Ending Routine 'age'-------
    for (const thisComponent of ageComponents) {
      if (typeof thisComponent.setAutoDraw === 'function') {
        thisComponent.setAutoDraw(false);
      }
    }
    age = final_response.replace("\n", ",");
    thisExp.addData("Age", age);