Having error with the same experiment and new version of python

URL of experiment:

Description of the problem: Two months ago I moved my experiment to pavlovia and it worked. My python on system was 3.6 and i can’t remember the version of psychopy. Then Something happened to my laptop and I lost all my softwares. Now I’m trying to put the same experiment (build in builder view with some code components) to pavlovia but I keep getting the “unexpected token” error which refers to this line: code1SeqVisClock = new util.Clock();.
Now my python is 3.8 and my psychopy version is 2020.2.10.
This is a weird error cause I didn’t have it before and it doesn’t seem to be a serious problem!
Do anybody has any idea what would be the problem? Is it possible that my version of python or Psychopy is the culprit?
Thank you.

That’s weird indeed! Two questions:

  • Have you generated the HTML and JS anew?
  • Is the “.” part of that line?

Hi @thomas_pronk, Thank you for your reply. First question: yes I’ve done it.
Second question: No, it’s not in the code.
And I think now I know what is the problem. In face the problem is not related to clock function at all and it’s indicating to it incorrectly. The problem was using the package “random” in my code which doesn’t make sense in javaScript.

1 Like

Happy to read you worked it out!