0

I'm writing python program to work with git repositories, it works right on win7, but I'm also need this program to work on win xp (win xp supports python 3.4, pygit2 0.28 wont work on win xp (dll import errors) so I'm installed pygit2 0.25.0) I'm using pyinstaller to build .exe

p = pygit2.Repository(repository_path)  

generates exception(on windows XP):

Failed to resolve path 'C:\TestRepository.git' : Invalid argument

def get_repo():
    repository_path = "C:\\TestRepository\\.git"
    try:
        p = pygit2.Repository(repository_path)
    except Exception as e:
        print(str(e) + " (exception)") # print to console
        return None
    return p

What I'm tried:

repository_path = Path("C:\\TestRepository\\.git").resolve() 

returns exception: must be str, not windows path

repository_path = "C:/TestRepository/.git"
repository_path = b"C:\\TestRepository\\.git"
repository_path = r"C:\TestRepository\.git"
repository_path = "C:\\TestRepository\\.git".encode("utf-8")

returns exception: Failed to resolve path 'C:\TestRepository.git' : Invalid argument

I expect for function get_repo to return Repository

Karmen
  • 1
  • 2

1 Answers1

0

Solved: libgit2 dropped support for Windows XP from v. 0.21.0

Karmen
  • 1
  • 2