Open
Description
Version Information
-
Python Tested in 3.5.4 and 3.7.0
-
pip-18.1
-
github3.py 1.2.0,
-
requests 2.19.1,
-
uritemplate 3.0.0,
-
python-dateutil 2.7.3
Minimum Reproducible Example
from github3 import GitHub
gh = GitHub()
repo = gh.repository('home-assistant', 'home-assistant.io')
contributors = repo.contributors(anon=True)
for contributor in contributors:
print(contributor)
Exception information
It raises an exception as soon as it meets an anonymous entry. See the API response, the last successfully parsed contributor is acockburn
, right after which comes the first anonymous record.
pavoni
happyleavesaoc
acockburn
Traceback (most recent call last):
File "Q:\Program Files\Python35\lib\site-packages\github3\models.py", line 48, in __init__
self._update_attributes(json)
File "Q:\Program Files\Python35\lib\site-packages\github3\users.py", line 937, in _update_attributes
super(Contributor, self)._update_attributes(contributor)
File "Q:\Program Files\Python35\lib\site-packages\github3\users.py", line 311, in _update_attributes
self.avatar_url = user['avatar_url']
KeyError: 'avatar_url'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Q:\Program Files\Python35\lib\site-packages\github3\structs.py", line 97, in __iter__
yield cls(i)
File "Q:\Program Files\Python35\lib\site-packages\github3\models.py", line 50, in __init__
raise exceptions.IncompleteResponse(json, kerr)
github3.exceptions.IncompleteResponse: None The library was expecting more data in the response (KeyError('avatar_url',)). Either GitHub modified its response body, or your token is not properly scoped to retrieve this information.