500 Error: Synching with Pavlovia

Description of the problem: i’m trying to sync a study (that I previously created. I have then downloaded it, modified certain values in .csv files, and am trying to create a new ‘project’ and push this “new project” to Pavlovia. I am getting the following error, at the first time uploading (and none of my files are making it to pavlovia):

What is this error: Traceback (most recent call last):
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1608, in onPavloviaSync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 873, in sync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1116, in firstPush
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 542, in
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 1005, in _call_process
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 822, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy 4.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
cmdline: /Applications/PsychoPy 4.app/Contents/Resources/git-core/git push -u Sign in · GitLab master
stderr: ‘warning: redirecting to Sign in · GitLab
error: RPC failed; HTTP 500 curl 56 The requested URL returned error: 500
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date’

Can someone kindly help me to fix this?

1 Like

Did you delete the local hidden .git file and folder so it knew you wanted a new project?

1 Like

I am working on a mac, and do not see a .git file.

Usually I am working on a Windows computer, and when I do this exact same thing, I see a .git file that I delete and it helps loads. Now I am working on a mac, and when I copy all the files to a new folder (and change the name of the folder - e.g., to “x” - on my computer, as the .psyexp file name, and also within the general settings, as well as deleting any .js files) it lets me create a new project. But it gives me errors, and doesn’t really copy any of my files. If I try again, I get this:

Traceback (most recent call last):
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1608, in onPavloviaSync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 873, in sync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1110, in firstPush
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1269, in commit
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 542, in
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 1005, in _call_process
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 822, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy 4.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
cmdline: /Applications/PsychoPy 4.app/Contents/Resources/git-core/git commit -m Push initial project files
stdout: ‘On branch main
nothing to commit, working tree clean’

A little bit more google, and it turns out the " Cmd + Shift + . " reveals hidden .git files! I’ve deleted those, deleted whatever was on Pavlovia, as well as .js files. But when I tried again, I got:

Traceback (most recent call last):
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 1608, in onPavloviaSync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 873, in sync
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/psychopy/projects/pavlovia.py”, line 1116, in firstPush
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 542, in
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 1005, in _call_process
File “/Applications/PsychoPy 4.app/Contents/Resources/lib/python3.8/git/cmd.py”, line 822, in execute
git.exc.GitCommandError: Cmd(‘/Applications/PsychoPy 4.app/Contents/Resources/git-core/git’) failed due to: exit code(1)
cmdline: /Applications/PsychoPy 4.app/Contents/Resources/git-core/git push -u Sign in · GitLab master
stderr: ‘warning: redirecting to Sign in · GitLab
error: RPC failed; HTTP 500 curl 56 The requested URL returned error: 500
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date’

Hi Grace!

I was experiencing a similar issue (Error 500 when trying to sync experiment from Builder to Pavlovia) and ended up following the advice listed here: HTTP 500 error on initial git push.

Let me know if you have trouble following those steps! Just type "cd " (with the space) into terminal, drag the hidden .git file into terminal, press enter, and then use commands listed in this solution:

git config http.postBuffer 524288000

followed by:

git push -u origin master
2 Likes

I’ve just been helping someone with this bug and this was indeed the issue. We’ll implement something where PsychoPy updates the project config as needed if the error is encountered (hopefully in 2024.2.3) so this step won’t be needed by the user

If the step of manually pushing doesn’t work by the way, you can just do the git config step and then sync in psychopy as usual.

Thanks @Calvin_Engstrom

1 Like

Hi, I seem to be having the same problem but I don’t understand where I am supposed to type this git info. Can you be more specific?

You can simply download the latest version of PsychoPy which fixes the problem for you

OR change the buffer size globally by doing this in terminal:

git config --global http.postBuffer 524288000

OR change it just for this one project (which is what psychopy now does for you):

cd <path to project folder>
git config http.postBuffer 524288000

Thanks so much! Downloading the latest version solved the problem.

Hello,

I just resolved this issue, so I wanted to share what worked for me in case it helps others.

Based on various posts, I suspected that the problem was related to the buffer size. In my case, my PsychoPy project had been successfully set up and synced multiple times, but out of nowhere, I started getting this error. I’m pretty sure it happened because my latest changes included large instruction files (several .png images).

Steps I Took to Fix It (Mac Terminal)

  1. Navigate to Your PsychoPy Project Folder**
  • Open the folder where your project is stored.
  • Right-click on your .psyexp file, select Get Info, and copy the Where path.
  • Open Terminal and change to that directory using:
cd /path/to/your/git/repository
  1. Check Git Status

On the terminal run:

git status

If it shows changes, then your repo is fine.
If it gives “not a git repository”, your .git folder might be missing.

When I ran git status, I got:

On branch master  
nothing to commit, working tree clean  

which meant everything was set up correctly.

  1. Check Your Remote Repository

Run:

git remote -v

If you see a URL (GitHub/GitLab/Pavlovia), your remote is correctly set up.
Mine was fine, so I moved to the next step.

  1. Increase Git’s HTTP Buffer Size

Run this command in Terminal:

git config --global http.postBuffer 524288000

This increases the buffer size to 500MB, which can help when pushing large files.

  1. Sync Your Project Again in PsychoPy**

After increasing the buffer size, I retried syncing my project in PsychoPy, and bam—it worked!

Hope this helps anyone facing the same issue!