HTTP 500 error on initial git push

OS (e.g. Win10): macOS 14.6.1
PsychoPy version (e.g. 1.84.x): 2024.2.1
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:
I’m trying to do an initial push of my project to Pavlovia - it’s a copy of an existing project but I regenerated the .js file and removed the hidden .git folder to upload it as a new project.

What did you try to make it work?:
I tried both clicking the sync button to create the project and clicked the “create new project” button. In both cases an empty repository with the desired name was created. Trying to push changes on an existing repository also produces the same error.

What specifically went wrong when you tried that?:
I got this error message:

Traceback (most recent call last):
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/ribbon.py”, line 1017, in onPavloviaCreate
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/builder/builder.py”, line 1612, in onPavloviaSync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 912, in sync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1155, in firstPush
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 986, in <lambda>
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1598, in _call_process
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1388, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(1)
  cmdline: git push -u https://*****:*****@gitlab.pavlovia.org/bforys/sounds_in_context_features master
  stderr: ‘warning: redirecting to https://gitlab.pavlovia.org/bforys/sounds_in_context_features.git/
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly
Everything up-to-date’

If I try to resync it, I get the following error message:

Traceback (most recent call last):
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/coder/coder.py”, line 2871, in onPavloviaSync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/app/pavlovia_ui/project.py”, line 854, in syncProject
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 912, in sync
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1149, in firstPush
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/psychopy/projects/pavlovia.py”, line 1308, in commit
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 986, in <lambda>
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1598, in _call_process
  File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.10/git/cmd.py”, line 1388, in execute
git.exc.GitCommandError: Cmd(‘git’) failed due to: exit code(1)
  cmdline: git commit -m Push initial project files
  stdout: ‘On branch master
nothing to commit, working tree clean’

Any help on this would be greatly appreciated, thank you! I saw that in the past this error was related to a server-side issue.

I was able to resolve the issue myself - it turns out that the git http buffer was too small for the repository for some reason. I fixed it by going into the git repository in terminal and doing:

git config http.postBuffer 524288000

followed by:

git push -u origin master

Posting this in case anyone else encounters a similar issue!

2 Likes

Hmm, did your study have a lot of stimuli? From the documentation of git it looks like the post buffer is essentially a cap on how large (in terms of bytes) a single commit can be before it switches to “chunked encoding”, which it looks like breaks the commit command. 1mb is a huge amount for text files but I imagine if you’re using video/audio stimuli you’ll smash right through it on an initial commit with all stimuli present - good to know this is the case for future reference, thanks!

Another way around this, for anyone wanting to keep the 1mb post buffer size for other reasons, would be to temporarily remove large stimuli, sync, then add them back in a few at a time & sync in-between so they get sent in separate commits.

Just wanted to echo that this solution seems to be working for me too! Thank you!

1 Like

Thanks for your response! Yes, my study has 20 .wav files totalling 7.7 MB so that might explain it. Strangely I never ran into this issue with earlier versions of PsychoPy (2021.x or 2022.x) and it only occurred when updating the code.

Hey, having the exact same problem but very new at using Pavlovia. So, I am not finding the place where to write what you have written…

Hello, could you provide detail on how you went into the git repository in terminal? What path did you use? When I navigate into mine which should be in /usr/local/Cellar/git/2.47.0, I get the following error when trying to execute the above code: fatal: not in a git directory. Could you please advise? I also created a clone for the PsychoPy repo locally on my PC, but if I go into that, the same error will occurs. Am I missing something obvious? Any advice would would be much appreciated.