Experiemnt stuck on initialising

URL of experiment: experimentalgruppe [PsychoPy]

Description of the problem: Hi there! We’re two students having problems with running our experiment online. The page is stuck on “initalising”, we searched through the forum looking for help or people with similar problems, but couldn’t really find anything. We’re extremely thankful for anyone out there who can give us a step by step on how to fix this. Thank you!

Hi! I have the same problem. In my case, it seems to be due to importing numpy to Python, which is incompatible with the Py → JS translator.

Not using any libraries you use currently might help in getting pas the initialising stage.
You could try to look at the developer view by pressing crtl+shift+J on the web page, likely you’ll see something like “Uncaught SyntaxError: Unexpected token ‘*’”, which correlates to this line of JS code: import * as random from ‘random’;

Hi There,

If an experiment is stuck initialising it means that there is a syntax error somewhere in the compiled JavaScript. The usual places that these errors occur are:

  1. Code components - if there is an error somewhere in the JavaScript syntax (either from a code component with code type ‘Auto>JS’ where the code has not translated, or from a code type Both/JS where the JS side contains a syntax error).
  2. If you do not have a code component it might be that there is a comma or something missing in a parameter field.

I would suggest the below to find the location of the syntax error.

  1. Launch the page that is stuck on ‘initializing’
  2. right click and ‘inspect’ the window
  3. Go to the ‘console’ section that opens up (it might start automatically in ‘elements’ navigate to the console tab).
  4. the console should show an error message with a message that looks like it is refering to the line of code causing the problem in your script. try to click on that line number - if it doesn’t let you click on it refresh the page and try to click on it.
  5. clicking on the line of code will show you where in the compiled code the error is arising from.

Hope this helps,
Becca

Thank you so much!
This is the error message: Failed to load resource: the server responded with a status of 404 ()
What does that mean? What could be the problem?


Another error popped up

Hi There, I just tried your link and it didn’t get stuck on the initialising screen (and the resources load until then I see the first survey page) - is the initialising screen issue now resolved?

Thanks!
Becca

Hi Becca,

Fortunately we solved the problem! Thank you so much

Hello,
I think you have a stable internet connection as unstable connectivity can cause loading issues. May be you’re using a compatible browser like Google Chrome or Mozilla Firefox, as some browsers may have issues with PsychoPy. The latest version of PsychoPy and that all your experiment files are up to date.