urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
911 stars 100 forks source link

requests.exceptions.ConnectionError in follow() #74

Closed davidswelt closed 7 years ago

davidswelt commented 7 years ago

follow() raises an inappropriate exception after an initial call to collection_items. The first call works, the second one (at 49 items) results in the exception below rather than StopIteration as documented.

File "./zot.py", line 258, in retrieve_bib items += zot.follow() File "/Library/Python/2.7/site-packages/pyzotero/zotero.py", line 128, in wrapped_f retrieved = self._retrieve_data(func(self, *args)) File "/Library/Python/2.7/site-packages/pyzotero/zotero.py", line 264, in _retrieve_data headers=self.default_headers()) File "/Library/Python/2.7/site-packages/requests/api.py", line 69, in get return request('get', url, params=params, kwargs) File "/Library/Python/2.7/site-packages/requests/api.py", line 50, in request response = session.request(method=method, url=url, kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 465, in request resp = self.send(prep, send_kwargs) File "/Library/Python/2.7/site-packages/requests/sessions.py", line 573, in send r = adapter.send(request, kwargs) File "/Library/Python/2.7/site-packages/requests/adapters.py", line 415, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))

urschrei commented 7 years ago

Oh. Fixed and released to PyPI as v1.2.10