You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
Okay, here's another raise that confused me. The tutorial seemed to indicate that exceptions would be raised as HTTPError's, but this came through as a ConnectionError.
File "/home/pi/pool/main/sendto_xively.py", line 36, in sendto_xively
datastream.update()
File "/usr/local/lib/python2.7/dist-packages/xively/models.py", line 234, in update
self._manager.update(self.id, **state)
File "/usr/local/lib/python2.7/dist-packages/xively/managers.py", line 425, in update
response = self.client.put(url, data=kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 387, in put
return self.request('PUT', url, data=data, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/xively/client.py", line 77, in request
return super(Client, self).request(method, full_url, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 335, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 438, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 327, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='api.xively.com', port=80): Max retries exceeded with url: /v2/feeds/1905326953/datastreams/Spa (Caused by <class 'httplib.BadStatusLine'>: '')
Okay, here's another raise that confused me. The tutorial seemed to indicate that exceptions would be raised as HTTPError's, but this came through as a ConnectionError.
The example suggested this would work:
Do I need to nest another try/except to handle the
ConnectError()
?The text was updated successfully, but these errors were encountered: