Pavlovia Doesn't Update

Bit of a head scratcher here.

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.

Empty the browser’s cache or - in some browser’s - ctrl+shift-r.

You can also copy/paste the URL in a private/incognito window to see if the new version appears

Bw
Yiannis

1 Like

Good thinking but that does’t work. I’ve even tried running it on a different computer.

Are you somehow pushing to a branch other than master on Pavlovia?

Do you have two index.html files in your repository (e.g. one in the root and one in an html folder).

No–there re no branches it’s all in master.

I only have one index.html file in the root of the repository.

It’s also worth noting that I’ve updated the task multiple times before–this is the first time with this issue.

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?

Yes–I’ve tried just adding a new routine with a text module, as basic as it comes. That is also failing to update on Pavlovia (but it does locally).

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.

Do you mean the JS code locally or on Pavlovia?

Both. And I check the code both as it is on gitlab and checking the JS file by inspecting the browser window while piloting the task.

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.

Occlusion_Psychophysics.psyexp (129.9 KB)

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!

I’m confused now. Are you constructing your JS file manually rather than getting PsychoPy to do it for you?

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.