psychopy.org | Reference | Downloads | Github

Local changes succesfully pushed to gitlab, but pavlovia reports merging conflict

My local changes are pushed to the gitlab repository, but Pavlovia does not update the current experiment, even though it detects that it was updated (The dates match under the study’s name).

In addition, I tried making the experiment inactive and then pilot again, hoping it would fetch the latest gitlab version. Then I got the error message below. The experiment only contains JS costum code.

Can someone advise me on how to proceed? At the moment it is unclear how the merge conflict was caused.

The error message:

>>>> unable to pull project from GitLab repository: Cmd(‘git’) failed due to: exit code(1) cmdline: git pull -v origin stderr: ‘error: Your local changes to the following files would be overwritten by merge: html/main-legacy-browsers.js html/main.js main.psyexp Please, commit your changes or stash them before you can merge. Aborting’

Full description:

{
  "origin": "http://pavlovia.org/api/v2/experiments/lenarddome/action001",
  "pathWithNamespace": "lenarddome/action001",
  "errorCode": null,
  "experiment": {
    "gitlabId": 19933,
    "pavloviaUrl": "https://pavlovia.org/run/lenarddome/action001/html/",
    "nbForks": 0,
    "recruitment": {
      "policy": {
        "url": "https://pavlovia.org/run/lenarddome/action001/html/",
        "singleRun": false,
        "type": "URL"
      }
    },
    "saveFormat": "CSV",
    "avatarUrl": "",
    "nbStars": 0,
    "pavloviaScore": 0,
    "platform": "PSYCHOJS",
    "status": "INACTIVE",
    "description": "",
    "nbSessions": 0,
    "visibility": "private",
    "runMode": "CREDIT",
    "creationDate": "2020-03-23 17:49:26.504",
    "name": "action001",
    "status2": "PILOTING",
    "gitlabUrl": "https://gitlab.pavlovia.org/lenarddome/action001.git",
    "userIds": [
      4118
    ],
    "pathWithNamespace": "lenarddome/action001",
    "lastActivationDate": "2020-03-23 18:17:42",
    "updateDate": "2020-03-24 16:23:58",
    "creatorId": 4118
  },
  "user": {
    "two_factor_enabled": false,
    "username": "lenarddome",
    "theme_id": 1,
    "can_create_project": true,
    "bio": null,
    "confirmed_at": "2020-03-16T16:52:47.545Z",
    "twitter": "",
    "private_profile": null,
    "shared_runners_minutes_limit": null,
    "linkedin": "",
    "color_scheme_id": 1,
    "last_sign_in_at": "2020-03-19T17:24:00.014Z",
    "web_url": "https://gitlab.pavlovia.org/lenarddome",
    "last_activity_on": "2020-03-24",
    "external": false,
    "skype": "",
    "identities": [],
    "id": 4118,
    "public_email": "",
    "name": "myname",
    "can_create_group": true,
    "projects_limit": 100000,
    "current_sign_in_at": "2020-03-23T17:40:18.233Z",
    "created_at": "2020-03-16T16:52:47.721Z",
    "emails": [
      "myemail"
    ],
    "state": "active",
    "avatar_url": "https://secure.gravatar.com/avatar/2b28ef5e2301e2590351b1b241b398a5?s=80&d=identicon",
    "location": null,
    "organization": null,
    "email": "myemail",
    "website_url": ""
  },
  "context": "when updating the attribute(s) of an experiment",
  "error": "unable to pull project from GitLab repository: Cmd('git') failed due to: exit code(1)\n  cmdline: git pull -v origin\n  stderr: 'error: Your local changes to the following files would be overwritten by merge:\n\thtml/main-legacy-browsers.js\n\thtml/main.js\n\tmain.psyexp\nPlease, commit your changes or stash them before you can merge.\nAborting'",
  "httpStatusCode": 500
}

Odd, but the simplest solution is probably to save a copy of the experiment on your local computer and then upload it as a new experiment.

1 Like

I thought about it. But assuming that this error happens again, I would need to upload the whole experiment again, creating repository after repository. I am convinced that there is something I don’t see and someone else will.

I did try to create a new repository, but now I have the following error:

>>> unable to pull project from GitLab repository: /var/www/pavlovia.org/run/lenarddome/postgrad001

It might really be due to weird sync behavior, but it is hard to imagine how it can result from overburdening the servers. Nonetheless, there are some other issues that seem similar, as you noticed.
Hopefully what I included is helpful for developers.

@jon @dvbridges @apitiot is anyone looking at the gitlab side of things? It seems like there are some weird git behaviors happening right now.

@jonathan.kominsky, not aware of any issues personally. @lenarddome, did you make any changes at all using Pavlovia? If you made changes online, and then also made changes to the same lines of code locally, then tried to sync, this would explain how a git merge conflict occurred.

@dvbridges I did not edit the code online, only locally within Psychopy. See first post for the steps that resulted in the error. I can also recreate the error after making the study inactive and reselecting pilot.

I am a fairly okay git user, so I could resolve merge conflicts between online and local copies. But the message was thrown by Pavlovia when I try to pilot the study, and not git or Psychopy. It is not urgent for me, but the error does seem weird, so I posted it.

1 Like

Hello @lenarddome,

It appears that your experiment was in Git limbo, possibly because of a connection interrupted at an inopportune moment.
I have sorted things out on my end. Could you check whether all is well on yours?

Alain

1 Like

Hi Alain,

Thx for having a look at it. Simply clicking on pilot will still run the old version of the study and not the latest one.

Also, what do you mean by checking? Do you mean making the study inactive and then pilot again?

I believe that your git repository is now in a working state.
You should be able to sync your experiment from our desktop. Would you like to give it a try?

Okay, I synced. So far, everything as it was before. I could successfully commit and push my local changes.

Pushing changes from remote...
done
Successful sync at: 13:33:19, took 1.751s27.9271     INFO     Successful sync at: 13:33:19, took 1.751s
92.0906     INFO     Investigating repo at /path/to/pavlovia/action001

I could push my changes to https://gitlab.pavlovia.org/lenarddome/action001 and the changes and commit messages seem to appear as intended. But pavlovia is still not updated: pilot study.

It detects that the files were updated today, but the actual experiment it runs is not the updated version.
image
I do not get the merge conflict error from the first post tough when making the study inactive and then pilot again.

I believe that the changes were enacted (main.js was updated at 13h33 UK time).
You might simple experience a browser cache issue. If you clear your browser cache and reload your experiment, with any luck you should see the new version.

Alain

Thank you, yes. Now it is resolved completely.

Now I can see what is working and what is not, so I can continue to debug the actual experiment. I will mark it as solved.

Splendid!
Enjoy the platform. And happy debugging!

Alain

1 Like