Sync error: divergent branches

W10, Psychopy versions 2024.2.1 and 2024.2.2 with python 3.10.

Hi,

As of the last 2 versions of PsychoPy I seem to have difficulties synching my tasks to pavlovia more than once.

The initial uploading of my projects works well and I can run my exps online just fine but if I make any changes and try to sync the project I keep getting the error below. I am afraid I am not particularly familiar with git CLI commands.

I do not want to downgrade as I will have to recreate the projects from scratch.

Any pointers or advice will be much appreciated.

Thanks
Yiannis

Traceback (most recent call last):
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\app\builder\builder.py", line 1612, in onPavloviaSync
    pavlovia_ui.syncProject(parent=self, file=self.filename, project=self.project)
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\app\pavlovia_ui\project.py", line 854, in syncProject
    project.sync()
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py", line 914, in sync
    self.pull(infoStream)
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py", line 971, in pull
    raise e
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\projects\pavlovia.py", line 961, in pull
    info = self.repo.git.pull(self.remoteWithToken, 'master')
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\git\cmd.py", line 986, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\git\cmd.py", line 1598, in _call_process
    return self.execute(call, **exec_kwargs)
  File "C:\Users\ia230\AppData\Local\Programs\PsychoPy\lib\site-packages\git\cmd.py", line 1388, in execute
    raise GitCommandError(redacted_command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('C:\Users\ia230\AppData\Local\Programs\PsychoPy\MinGit\cmd\git.exe') failed due to: exit code(128)
  cmdline: C:\Users\ia230\AppData\Local\Programs\PsychoPy\MinGit\cmd\git.exe pull https://*****:*****@gitlab.pavlovia.org/Yiannis_A/stroopnew master
  stderr: 'warning: redirecting to https://gitlab.pavlovia.org/Yiannis_A/stroopnew.git/
From https://gitlab.pavlovia.org/Yiannis_A/stroopnew
 * branch            master     -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.'

Hello, I can replicate this error and have alerted the developers.

If it helps I think it happens after a data file is created online. So if I do the following I get the error:

  1. Make project on pavlovia
  2. Set task to running mode
  3. get a data set online
  4. Make a change locally and try to sync.

But if I do the following I get no error:

  1. Make project on pavlvoia
  2. Set task to pilot mode on pavlvoia (meaning data do not sync to the project)
  3. Make a change locally and sync

This doesn’t resolve the issue but does make it easier to test your task if you usually follow process 1 to test (like I do!)

1 Like

Hi @Becca , many thanks for looking into this, truly appreciate it!

I am rather surprised I am the only one who came across this bug.

Thank you for explaining the issue and for offering a workaround - to be honest I had to downgrade to 2023.2.3. (the last known working version for me) because:

  • for the last two versions the loops online also appear broken (no issues with the offline version of my exps). At least in my case they were only running one trial no matter what the number of rows were in the conditions.xlsx file (I can post the exp here if you want to have a look at this one too)
  • I have a dozen or so projects I am working on for the students I support and I did/do not have the time to figure out why things did not work so downgrading was a quick solution - for now.

Again many thanks for the response

BW
Yiannis

This is an issue with non-slip timing (green routines). The workaround is to end the routine with a time in routine settings instead of giving all of the components end times.

1 Like

Hi @wakecarter

Yes this is it! I remember that in the data files I was getting multiple rows for my practice trials though it was showing only one trial (or, as it seems, multiple trials in one go). My head was spinning and I didn’t think to check why, I had to move on :confused:

Sorry I missed the quoted post.

I guess I’ll upgrade to version 2024.2.3 when it becomes available.

Thanks
BW
Yiannis