-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi,
Following this tutorial: https://www.twilio.com/blog/2017/08/geospatial-analysis-python-geojson-geopandas.html
When I get to the geojsonio.display() line, I get the following error:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~/temp-venv/lib/python3.6/site-packages/github3/models.py in __init__(self, json, session)
47 try:
---> 48 self._update_attributes(json)
49 except KeyError as kerr:
~/temp-venv/lib/python3.6/site-packages/github3/gists/gist.py in _update_attributes(self, gist)
324 def _update_attributes(self, gist):
--> 325 super(Gist, self)._update_attributes(gist)
326 self.commits_url = gist['commits_url']
~/temp-venv/lib/python3.6/site-packages/github3/gists/gist.py in _update_attributes(self, gist)
50 self.id = gist['id']
---> 51 self.owner = users.ShortUser(gist['owner'], self)
52 self.public = gist['public']
KeyError: 'owner'
During handling of the above exception, another exception occurred:
IncompleteResponse Traceback (most recent call last)
<ipython-input-12-9a29351e3f24> in <module>()
----> 1 geojsonio.display(precincts)
~/temp-venv/lib/python3.6/site-packages/geojsonio/geojsonio.py in display(contents, domain, force_gist)
34
35 """
---> 36 url = make_url(contents, domain, force_gist)
37 webbrowser.open(url)
38 return url
~/temp-venv/lib/python3.6/site-packages/geojsonio/geojsonio.py in make_url(contents, domain, force_gist, size_for_gist)
91 url = data_url(contents, domain)
92 else:
---> 93 gist = _make_gist(contents)
94 url = gist_url(gist.id, domain)
95
~/temp-venv/lib/python3.6/site-packages/geojsonio/geojsonio.py in _make_gist(contents, description, filename)
170 ghapi = github3.GitHub()
171 files = {filename: {'content': contents}}
--> 172 gist = ghapi.create_gist(description, files)
173
174 return gist
~/temp-venv/lib/python3.6/site-packages/github3/github.py in create_gist(self, description, files, public)
303 url = self._build_url('gists')
304 json = self._json(self._post(url, data=new_gist), 201)
--> 305 return self._instance_or_null(gists.Gist, json)
306
307 @requires_auth
~/temp-venv/lib/python3.6/site-packages/github3/models.py in _instance_or_null(self, instance_class, json)
144 return None
145
--> 146 return instance_class(json, self)
147
148 def _json(self, response, expected_status_code, include_cache_info=True):
~/temp-venv/lib/python3.6/site-packages/github3/models.py in __init__(self, json, session)
48 self._update_attributes(json)
49 except KeyError as kerr:
---> 50 raise exceptions.IncompleteResponse(json, kerr)
51
52 def _update_attributes(self, json):
IncompleteResponse: None The library was expecting more data in the response (KeyError('owner',)). Either GitHub modified it's response body, or your token is not properly scoped to retrieve this information.
Metadata
Metadata
Assignees
Labels
No labels