首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python拉取时出现dulwich错误

Python拉取时出现dulwich错误
EN

Stack Overflow用户
提问于 2016-08-31 20:56:05
回答 1查看 292关注 0票数 0

当我尝试使用dulwich拉取一个文件夹时,我得到了这个错误:

代码语言:javascript
复制
 AttributeError: 'NoneType' object has no attribute 'startswith'

我在windows或linux上也遇到了同样的错误。克隆功能运行完美

下面是我的代码:

代码语言:javascript
复制
 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)

当我使用以下命令更改pull函数时:

代码语言:javascript
复制
 porcelain.pull("test", depot_maj, "refs/heads/master")

我得到了:

代码语言:javascript
复制
 TypeError: startswith first arg must be str or a tuple of str, not bytes

我哪里做错了?

编辑: Im正在运行Python 3.5

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-08 08:40:31

FWIW此问题已在较新版本的Dulwich中修复。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39250285

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档