Pavlovia Sync Problem

URL of experiment: Pavlovia

Description of the problem: I have been working in a fork of Thomas Pronk / demo_embed_html · GitLab, to get a dynamic blurring paradigm working in an iFrame displayed on top of the Pavlovia window. This has worked decently well so far, but I have encountered a handful of different issues syncing this (and a different project) to Pavlovia. I was hoping my problems would be fixed after updating to 2021.1.2, but here is one I am still having:

I tried to add in parent.addData(“variableName”, someValue); to the HTML code I am using, to send data values back to my experiment from the iFrame. I have gotten this to work in another experiment before, but I was not getting so much as the variable name appearing in my output file here, so I started debugging by moving this line to different places in my HTML code.

My next test was to see what would happen if I moved all of the custom code in builder view to just one instance in my main routine, and eliminated the first routine that just existed to say “click anywhere to continue.” This is where I noticed an issue with my experiment on Pavlovia. Even though my experiment said it synced successfully, the experiment would run with the first routine still in place.

I tried deleting and remaking the HTML and JS files. I tried moving them from the HTML folder that is no longer PsychoPy’s default output path (and removing HTML from the output path in my experiment settings). When I tried that and synced, and then clicked from “inactive” to “piloting”, I got this:

 Error when updating the experiment: karipayne/blurtest
 >>> unable to clone project from GitLab repository: [Errno 2] No such file or directory
 If the error persists, contact Pavlovia's administrator.
 Full description:
   "origin": "",
   "context": "when updating the attribute(s) of an experiment",
   "pathWithNamespace": "karipayne/blurtest",
   "user": {
     "id": 9793,
     "name": "Kari Payne",
     "username": "karipayne",
     "state": "active",
     "avatar_url": "",
     "web_url": "",
     "created_at": "2020-08-21T01:13:25.513Z",
     "bio": null,
     "location": null,
     "public_email": "",
     "skype": "",
     "linkedin": "",
     "twitter": "",
     "website_url": "",
     "organization": null,
     "last_sign_in_at": "2021-02-25T05:13:11.753Z",
     "confirmed_at": "2020-08-21T01:13:25.422Z",
     "last_activity_on": "2021-03-02",
     "email": "",
     "theme_id": 1,
     "color_scheme_id": 1,
     "projects_limit": 100000,
     "current_sign_in_at": "2021-02-25T06:03:18.166Z",
     "identities": [],
     "can_create_group": true,
     "can_create_project": true,
     "two_factor_enabled": false,
     "external": false,
     "private_profile": null,
     "shared_runners_minutes_limit": null,
     "emails": [
   "experiment": {
     "gitlabId": 104967,
     "avatarUrl": "",
     "creationDate": "2021-02-09 21:47:57.743",
     "creatorId": 9793,
     "description": "",
     "gitlabUrl": "",
     "name": "Blurtest",
     "nbForks": 0,
     "nbStars": 0,
     "pathWithNamespace": "karipayne/blurtest",
     "pavloviaScore": 0,
     "pavloviaUrl": "",
     "platform": "PSYCHOJS",
     "recruitment": {
       "policy": {
         "type": "DISABLED"
     "runMode": "CREDIT",
     "saveFormat": "CSV",
     "saveIncompleteResults": true,
     "status": "INACTIVE",
     "status2": "PILOTING",
     "updateDate": "2021-03-02 03:35:54",
     "userIds": [
     "version": "2021.1.2",
     "visibility": "private",
     "htmlPath": "/html/",
     "lastActivationDate": "2021-03-02 01:44:02",
     "nbSessions": 0
   "error": "unable to clone project from GitLab repository: [Errno 2] No such file or directory",
   "errorCode": null,
   "httpStatusCode": 500

So, I deleted the HTML and JS files again, and re-exported them from builder view back into the html path (after adding HTML back to the output path in settings). When I fired up the experiment again, the first “click anywhere to begin” routine still appeared, even though it has been absent from my builder view for at least the past 8 syncs. This leads me to believe my attempts to add parent.addData(“variableName”, someValue); to my HTML code for the iFrame were not syncing either—that would explain why I would not even get the variable name to appear in my output file.

One more thing that may be related: This past week I have encountered cases where my custom HTML code for the iFrame did not seem to update on Pavlovia after syncing (for this and another project. It would update in the gitlab code, but I would not see my changes when running my experiment). I tried to address this for a different project by remaking it entirely in a new project file, but on Pavlovia I would then get a 403 error when trying to pilot it. This seemed similar enough to other issues I saw posted here, so I waited for 2021.1.2, and this is my first time using PsychoPy after the update.

Please let me know if there is anything obvious that I am doing incorrectly! Thank you for any insight you can offer!

Kari Payne

To update, I came back to this experiment after not editing it since my initial post. When running it again, the deleted routine did not appear! However, once I tried making changes to the custom HTML code, the same type of syncing problem reappeared. This one I can document a little better.

After syncing (that got the “successful sync” message), the code in GitLab reflected a change I made (first adding in a test parent.addData command, and after that did not work, adding in a parent.finishHTML command to see if I could get the HTML code to make any noticeable change at all):

But, when running the experiment and viewing the page source through inspect element, I got this:

Inspect Element

So, it was not running the updated version of my code that had synced to GitLab.

Thinking it could be a cache problem, I cleared my browser’s cache and tried to run it again. I get a 404 error now, with the video in the underlying PsychoPy experiment playing audio in the background. Even after undoing all of my recent changes and putting the content of the experiment and custom HTML back to how it was when it was working previously (and clearing my browser cache after that), I still get a 404 error.

I tried removing “html” from the output path in experiment settings once again, deleting the HTML and JS exported files that were in the “html” folder, and then re-exporting them to the root folder. I saved and synced and cleared my cache, and now I get a 403 error. It is possible that this is a syncing problem. Any help would be appreciated!

Hey! Could you share your gitlab repo? Then I’ll take a look if I see anything suspicious. My gitlab username is: tpronk

You should be able to view it now! The changes I was trying to test were adding in parent.addData() to save the mouse coordinates used to make the window I have, and either parent.nextEntry() with corresponding custom code to access nextEntry() from the iFrame, or adding nextEntry() into the existing addData() function in the custom code, to save more than one pair of coordinates. Without Pavlovia reflecting the changes I’ve made (to either the custom HTML file, or changes in the builder view at times), I have not been able to test this to see if these are working.

These changes should be removed from the code for now, because I wanted to see if undoing my recent changes fixed my issue. It did not.

Thank you for taking a look at this!

Hi again,

I think PsychoJS got a bit confused by the fact that there was a resource (the MP4) in an HTML folder. Regardless, I played around a bit to get something that doesn’t give any errors. The project tp_blurtest2, which I shared with you, should offer a better starting point.

Cheers, Thomas