Unhandled dependency error when opening existing project (git and gitpython)

Hi,

I keep on getting an unhandled internal error when trying to open an existing project, related to git and gitpython

This is from a pip install of psychopy created using Python 3.8.8rc1

Psychopy version 2024.2.4
I have also tried downgrading to 2024.2.1 or 2024.1.4 as suggested here but I always get the same error

Error message is below

Traceback (most recent call last):
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app_psychopyApp.py”, line 1206, in onIdle
idle.doIdleTasks(app=self) # run once
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app\idle.py”, line 133, in doIdleTasks
_doTask(taskName, app)
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app\idle.py”, line 170, in _doTask
currentTask’func’
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app\pavlovia_ui\menu.py”, line 103, in setUser
pavlovia.login(token)
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\projects\pavlovia.py”, line 157, in login
btn.updateInfo()
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app\ribbon.py”, line 957, in updateInfo
project = self.GetTopLevelParent().project
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\app\builder\builder.py”, line 1646, in project
return pavlovia.getProject(self.filename)
File “c:\users\428705\appdata\local\programs\python\python38\lib\site-packages\psychopy\projects\pavlovia.py”, line 1467, in getProject
raise exceptions.DependencyError(
psychopy.exceptions.DependencyError: gitpython and a git installation required for getProject()

I would be grateful for any advice on this

I have also tried using python 3.10, but that also did not make a difference

-= Software =-
Operating System: Microsoft Windows 11 Enterprise (10.0.22631.4602)

pip show python-gitlab
Name: python-gitlab
Version: 4.13.0
Summary: A python wrapper for the GitLab API
Home-page: GitHub - python-gitlab/python-gitlab: A python wrapper for the GitLab API.
Author:
Author-email: Gauvain Pocentek gauvain@pocentek.net
License: LGPL-3.0-or-later
Location: c:\users\428705\appdata\local\programs\python\python38\lib\site-packages
Requires: requests, requests-toolbelt
Required-by: psychopy

G:>pip show gitpython
Name: GitPython
Version: 3.1.44
Summary: GitPython is a Python library used to interact with Git repositories
Home-page: GitHub - gitpython-developers/GitPython: GitPython is a python library used to interact with Git repositories.
Author: Sebastian Thiel, Michael Trier
Author-email: byronimo@gmail.com, mtrier@gmail.com
License: BSD-3-Clause
Location: c:\users\428705\appdata\local\programs\python\python38\lib\site-packages
Requires: gitdb
Required-by: psychopy

G:>pip show gitdb
Name: gitdb
Version: 4.0.12
Summary: Git Object Database
Home-page: GitHub - gitpython-developers/gitdb: IO of git-style object databases
Author: Sebastian Thiel
Author-email: byronimo@gmail.com
License: BSD License
Location: c:\users\428705\appdata\local\programs\python\python38\lib\site-packages
Requires: smmap
Required-by: GitPython

Henning

PsychoPy 2024.2.5 has just been released so you could try that.

Try uninstalling the previous version first.

You should probably also clear your users.json file.

Hi, I have done 2 things now,

1)
downloaded 2024.2.5, installed with pip from source code available here Release 2024.2.5 · psychopy/psychopy · GitHub

This gives me still the same error message when trying to open an existing project

Traceback (most recent call last):
File “C:\python_3_10\lib\site-packages\psychopy\app\builder\builder.py”, line 780, in fileOpen
self.project = pavlovia.getProject(filename)
File “C:\python_3_10\lib\site-packages\psychopy\projects\pavlovia.py”, line 1467, in getProject
raise exceptions.DependencyError(
psychopy.exceptions.DependencyError: gitpython and a git installation required for getProject()

2
Downloaded standalone version of 2024.2.5

Here the error message does not appear

However, I would really like to be able to use pip install so that I can quickly change versions to deal with legacy experiments. Why does the check for an exisitng git installation fail in the pip install, but not in the standalone version?

You can have multiple versions of PsychoPy installed on your computer.

just to add in case someone else has a similar problem. I was able to make option 1 (pip install psychopy) work by first installing git, available here
Git - Installing Git

1 Like