How do I fix syntax errors related to type hints when using an external library like GitPython?

77 views Asked by At

When trying to run a Python script I got the following errors:

Traceback (most recent call last):
  File "C:\Users\{User}\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\__init__.py", line 8, in <module>
from git.exc import *  # @NoMove @IgnorePep8
  File "C:\Users\{User}\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\exc.py", line 10, in <module>
from git.compat import safe_decode
  File "C:\Users\{User}\AppData\Local\Programs\Python\Python35-32\lib\site-packages\git\compat.py", line 36
is_win: bool = os.name == "nt"
          ^
SyntaxError: invalid syntax

These errors seem to be related to GitPython. I successfully installed GitPython 3.1.37 and I am running Python 3.5.2.

Anyone familiar with these type of errors that would point me in right direction to fix these errors?

0

There are 0 answers