Kai Arakawa
Kai Arakawa

Reputation: 193

github3.py v1.3.0 AttributeError: iter_repos

I am trying to iterate over all repositories in a private organization. Here is some example code that does not work on my machine (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"))

When I run this, I get: AttributeError: iter_repos The traceback points to line 5 where I call iter_repos.

Upvotes: 1

Views: 236

Answers (1)

Ian Stapleton Cordasco
Ian Stapleton Cordasco

Reputation: 28757

I believe you want

   org.repositories(type="all")

iter_repos is from pre-1.0 github3.py

Upvotes: 3

Related Questions