github3.py v1.3.0属性错误:iter\u repos

2024-04-28 12:35:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图迭代私有组织中的所有存储库。下面是一些在我的机器上不起作用的示例代码(Windows 10、Python 3.6.5):

import github3

session = github3.login(token = "A token that works with other github3.py functions and also has all permissions for testing")
org = session.organization("private organization name")
repos = list(org.iter_repos(type = "all"))

当我运行这个时,我得到: 属性错误:iter\u repos 回溯到第5行,我称之为iter\u repos。你知道吗


Tags: 代码orgimport机器token示例thatsession