I’m trying to update my experiment files on Pavlovia to their most recent version. I have the code working locally (it runs fine, including the updated portion). When I push the files to Pavlovia, though, a problem occurs. The experiment runs, but it’s the old version. I add routines, text, etc., nothing. It’s stuck on the old version. The weird part is that, when I look at the code on Pavlovia, it includes the new portions. When I run the experiment in my browser and inspect the javascript file, same thing: the coee for the new additions is there but it doesn’t appear in the task.
I’ve tried both cycling between inactivating and re-activating the task, in addition to creating a whole new experiment, putting the files in the new experiment, and cycling again between inactive and piloting. Any and all suggestions appreciated.
If the updated code is on Pavlovia, then it must be some form of cache issue.
What I used to do, before I learned about Crtl-Shift-R, was add the upload time in a text component in the first routine so I knew which version was being run.
I do still sometimes have issues with edited spreadsheets since the forced refresh doesn’t necessarily refresh associated documents.
Is it possible that there is an error in your code such that the updated psyexp file isn’t updating the JS file? A syntax error in the Python code will do this. Perhaps you should show exactly what code isn’t being updated. Can you make a simple change to the first routine to check?
I’ve also checked the JS code and it includes the missing sections.
It’s also worth emphasizing, regarding caching issues, the problem endures using multiple browsers, after manually clearing the cache, and even on multiple machines.
Please could you upload your psyexp file and specify a particular bit of code that isn’t been run online. The only alternative to a cache issue I can think of is that something in your experiment is causing your code to be skipped.
For sure. File attached. In particular, none of the tutorial routines are working. I’ve tried updating text elements in other routines, and those run on Pavlovia correctly.
I notice that you have a whole bunch on code in “Before Experiment” which I would put in “Begin Experiment”. I also declare variables in Begin Experiment in an Auto component, simply by giving them a default value in Python.
On the other hand, I can’t think of any reason why something link Tutorial_instructions would fail when it has no code components. I’ve looked at the text size and colour.
Turns out the issue was that I was forgetting to add the new routines to the flowScheduler (ex: flowScheduler.add(InstructionsRoutineBegin());). Thanks for your help, everyone!
The bulk is generated automatically via the conversion, but there’s a portion, centered around resource loading, that I created separately. This portion included the schedulers, which I did not update to include the new routines.
I would strongly recommend not making direct edits to the JS file after it has been created by PsychoPy. When I want something to run online but not locally I either put it in a JS only code component or add contineRoutine = False in the Begin Routine of a Python only code component.