pythongitdulwich

Python dulwich error when pulling


When I try to pull a folder with dulwich, I got this error:

 AttributeError: 'NoneType' object has no attribute 'startswith'

I got the same error on windows or linux. The clone fonction works perfectly

Here is my code:

 from dulwich import porcelain
 import ssl

 depot_maj = "https://github.com/jelmer/dulwich.git"

 #Disable SSL verification for private server
 ssl._create_default_https_context = ssl._create_unverified_context


 #porcelain.clone(depot_maj, "test")
 porcelain.pull("test", depot_maj)

When i change the pull fonction with this:

 porcelain.pull("test", depot_maj, "refs/heads/master")

I got:

 TypeError: startswith first arg must be str or a tuple of str, not bytes

What i'm doing wrong ?

EDIT: Im running Python 3.5


Solution

  • FWIW this issue is fixed in newer versions of Dulwich.