psychopy.org | Reference | Downloads | Github

Pavlovia Stuck in Initializing

URL of experiment: https://pavlovia.org/smesfand/wtw-cookies
Project Page: https://gitlab.pavlovia.org/smesfand/wtw-cookies
Browser: Google Chrome

Description of the problem:
Hi all,

I am running on PsychPy3 and the experiment is running on the local console, but gets stuck on the initializing stage on a browser. I have gone through the related topics but am still unsure as what errors my code may contain. Links about include both .py and .js files. This is my first time working with both PY and JS so there is likely errors that I am just unaware of.

Thanks in advance for any help!

The experiments need to be set to public otherwise we cannot see it. I had a similar problem and it was because I was calling some packages, such as time and random, which java does not allow.

Sorry I forgot to make project public (which it is now!). Thanks for your help!

You have a lot of import statements in the beginning, those are most likely the ones that are giving you problems. See this post: Experiment stuck on initialising - Pavlovia

Thanks for redirecting me this thread has been helpful. Does this mean I should also remove import from this following section for my conditions?

function importConditions(loop) {
const trialIndex = loop.getTrialIndex();
return function () {
loop.setTrialIndex(trialIndex);
psychoJS.importAttributes(loop.getCurrentTrial());
return Scheduler.Event.NEXT;
};
}

If so how would one go about looping my trials?

I assume you used the coder to programme your task. To be able to use pavlovia, I would advise you to use the builder if you can as most of the conditions would be handled already and you would rely less on packages.

I see thanks for your assistance!