Stucked at the initialising page - Uncaught SyntaxError: Unexpected identifier 's'

URL of experiment: Sign in · GitLab

Description of the problem: Hi, I am an undergraduate student trying to conduct experiments for my dissertation on Pavlovia. I do not have any coding experience.

My experiment was forked from the Numerical Stroop demo. I wish to alter the questions at the start of the experiment so participants can fill in their participant ID which help me to identify their data from Qualtrics and Pavlovia. I found when I replaced the default ‘participant’ question with my question the experiment did not work, so I added new text and retained the original participant question.

After I made changes the experiment ran well on the local browser, but when I tried to run it on Pavlovia, it stuck at the initialising page.

The console provided an error message of Uncaught SyntaxError: Unexpected identifier ‘s’ NumericalStroop.js:17

The corresponding section of code (lines 14-19) is:

// store info about the experiment session:
let expName = ‘NumericalStroop’; // from the Builder filename that created this script
let expInfo = {
‘What is your participant ID?’: ‘For example Y26LS’,
‘participant’: ‘’,
};

Thank you for your help!

You have not posted the code causing the error.

What is your participant ID? (The first letter of your surname + your birthday (without month and year) + the first letter of the city where you were born + the first letter of your mother’s surname, for example, Y26LS)

This text includes an apostrophe in mother’s, closing the quote. you could try adding an escape character (mother\'s)

1 Like

Dear Wakecarter,

Thank you so much for your speedy reply.

The question you posted is my original question and after discovering the experiment cannot run due to errors in this text, I changed the question to ‘What is your participant ID? For example Y26LS.’ However, it seems the change is not synchronized successfully due to some unknown reasons.

I deleted the experiment and materials and uploaded the edited version to Pavolovia again. Now it seems fine.

Thank you for your help!

Tianyi

This page shows how to view the latest version of your code.

https://psychopy.org/online/psychoJSCodingDebugging.html