psychopy.org | Reference | Downloads | Github

Experiment not loading in Pavlovia

URL of experiment:

Description of the problem: Hi, this will be my first time posting here. Long story short- this past week, I created a symmetry span program that my supervisor will use for a new study in her lab. I got some feedback and right now, I’m in the process of modifying this experiment. However, I encountered an issue today. Apparently, what happened was that I tried to create a new variable in the experiment that stores correct answer based on which squares that the participant clicks on. I know that this issue has been addressed a number of times here on the forum and it has to do with the code “psychoJS.experiment.addData”. I implemented this code into the Javascript section of the code function. [Note: you can find this code in the routine called “Square_recall”]The experiment in Pavlovia would load if I just included this code but halfway into the experiment, I would get an error saying that a certain variable is not defined. I clicked on “inspect element” and it gave me a really vague error saying “uncaught syntaxError: Unexpected end of input” along with the line of the error. I opened up the link and it led me to the last line of the script. I really hope someone can assist me with this issue as this is a really pressing matter right now at work. I’ve attached both the builder and screenshot of the error I’m seeing on my end.ADD Symmetry Span Task.psyexp (516.5 KB)

Unexpected end of input can be due to an unbalanced bracket or quote.

Your auto translate components should be fine - or they would show an error on the JS side already, so concentrate on your JS and Both components.

Hi, thank you so much for getting back to me on this! Just a quick question- since I also have a code component for another routine called “Reset sequence”, do you want me to also focus on the JS and Both components for this routine? I thought it might be worth asking.

The error is likely to be in a code component in or before the routine showing the error. If the error message doesn’t refers to a Begin Experiment tab then the issue could be in a Begin Experiment tab in a later routine

Thank you so much for your feedback! I was able to get the experiment working yesterday after taking your suggestion!