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.
I've been experimenting with the python tutorials for sending data to Xively from python. The tutorial code didn't seem to include enough exception handling in some areas, and it's not clear to me how to determine where to add the exception handling. For instance, I received this crash log:
datastream = feed.datastreams.create(channel, tags="pool")
File "/usr/local/lib/python2.7/dist-packages/xively/managers.py", line 414, in create
response.raise_for_status()
File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 683, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error:
which seems to indicate that the stream creation failed. Note that it really never should have gotten to feed.datastreams.create() because it was actually an except: after a failed feed.datastreams.get() which shouldn't have failed. The tutorial suggested this:
I've been experimenting with the python tutorials for sending data to Xively from python. The tutorial code didn't seem to include enough exception handling in some areas, and it's not clear to me how to determine where to add the exception handling. For instance, I received this crash log:
which seems to indicate that the stream creation failed. Note that it really never should have gotten to
feed.datastreams.create()
because it was actually an except: after a failedfeed.datastreams.get()
which shouldn't have failed. The tutorial suggested this:So, maybe I should do this? :
The text was updated successfully, but these errors were encountered: