psychopy.org | Reference | Downloads | Github

Experiment Stuck on "Initializing the Experiment"

URL of experiment: tTraceTest8 [PsychoPy]

If the pilot URL is not the proper information to get help, please comment what information is needed.

Description of the problem: My experiment is stuck on “initializing the experiment” and I am struggling to find the solution. It works fine locally. Thank you in advance.

Did you use a code component? If so, there is probably something wrong in one of them. Try looking for common mistakes (e.g. missing “;”, { and } missing or with the wrong indentation) and check these documents: PsychoPy Python to Javascript crib sheet for translation errors.

Your issues is:

SyntaxError: Identifier ‘pi’ has already been declared

Have you used pi as a variable?

I downloaded this from Pavlovia, so I am not really familiar with the code (I’m also not really familiar with code in general, so the help is highly appreciated). Here are some screenshots of the code that includes pi.
Routine: setup
JScode:


Thank you so much for the feedback.

That code comes from my 2020 crib sheet.

PsychoPy now automatically adds the following to all scripts.

const { abs, sin, cos, PI: pi, sqrt } = Math;
const { round } = util;

Therefore these should no longer appear in JSCode.

Thank you so much!! This solved the “Initializing the Experiment” issue!

I am now receiving this error:

Here are some relevant threads

You could also change the experiment in PsychoPy to run as an earlier version. Try 2020.2.10.

URL: tTraceTest8 [PsychoPy]

Thank you so much, you’re incredibly helpful. All of my materials are in the html folder on github, the output in PsychoPy experimental settings is html, and it is still not finding my stimuli appropriately.

The html folder doesn’t work well with the latest version.

URL: tTraceTest8 [PsychoPy]

Hi, I moved this to a local folder, changed the output path to nothing, and reuploaded the task and it is still presenting the same issue.

Thank you in advance.