adafruit / Adafruit_IO_Python

Adafruit IO Python Client Library
Other
225 stars 99 forks source link

mqtt publish and REST send not working #17

Closed nikmart closed 8 years ago

nikmart commented 8 years ago

Hi there,

I am able to subscribe to changes on an feed without issue, however publish does not seem to be working. I am not getting an error message but no new data is showing up on adafruit.io.

I am also not able to send data with the REST examples. I just get back the following:

>>> aio.send('test', 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 90, in send
    return Data.from_dict(self._post(path, {'value': value}))
  File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 72, in _post
    self._handle_error(response)
  File "/usr/local/lib/python2.7/dist-packages/Adafruit_IO/client.py", line 56, in _handle_error
    raise RequestError(response)
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 500 Internal Server Error

I am running this on a Raspberry Pi 2 with Python 2.7

Any thoughts as to what might be going on?

tdicola commented 8 years ago

Thanks for checking out AIO! I had a chance to try reproing recently and the REST API send call seemed to work for me. I have a feeling you hit some intermittent instability with the service, like when it was moved to some bigger servers a few weeks back. In general a 500 internal server error means the request made it to AIO but something internally was wrong and it failed to process the request. If you try now do you still run into trouble? Thanks!

nikmart commented 8 years ago

Yup, seems to be working now! Thanks for the tip on the 500 internal service error. I will keep that in mind for the future.