I have put quite some time into my current experiment, and was always able to create the JS file by clicking on WriteJS, and the run it locally in pilot mode to try it out.
I started PsychoPy today, and no matter what I do, the last JS version of the experiment from my last time working on it is starting. I have tried:
Deleting all .js files in the directory
Updating the online files (which works, starting a pilot run from the dashboard starts the new version of the experiment.)
I don’t even know where this old version of the experiment could possibly be saved anymore.
The runner does give me this alert, but I’m not trying to start the python version, all my custom code components are written in JS directly without autoconversion:
I am still able to change my code and try new versions by syncing with pavlovia and trying it in the browser. But it’s annoying that I can’t just use the local run button anymore for no reason
OS (e.g. Win10): Win 11 PsychoPy version (e.g. 1.84.x): 24.2.22 Standard Standalone? (y/n) If not then what?: y
Do you have “continueRoutine = false” in a Python Begin Experiment tab?
This is an error for two reasons:
False takes a capital in Python and is lower case in JS.
continueRoutine = False doesn’t make sense in Begin Experiment – it should either be in Begin Routine (though Routine settings are better for this now) or Each Frame.
I would encourage you to create online experiments in Builder with Auto code components whenever possible. They help check your syntax.
I think that you can’t create a JS file at the moment from Builder because of at least one syntax error in your Builder file.
Hi, thanks for the fast reply. I still had a line of code in the Py part of one component by accident. I didn’t know Py and JS code in code components was stored seperately.
I now have no error messages anymore, but I still can only start my old version locally.
Using WriteJS and then syncing the files to pavlovia and starting them on pavlovia works. I need to do that for checking every change now. I can not use WriteJS and then click on “pilot in browser” in the builder anymore, it will start some old version saved wherever.
Edit:
I now deleted all js and html files in my directory, deleted all experiments on pavlovia, created a new project through the builder and synced them to pavlovia, and running the project locally still opens a days old version of my experiment instead of the one that is currecntly saved as a js file in my experiment folder.
For anyone reading:
The solution was to clear the browser cache.
I also went through psychopy version 2024.2.3 and 2024.2.4, both of which wouldn’t let me properly sync my files to pavlovia anymore. I would get a “syntax error” message when trying to create my JS file, and had to revert to 2024.2.2 to be able to make a working JS script again.