Black Lives Matter - Action and Equality. ... Adafruit joins the Stop Hate for Profit campaign.
0

Input is dead again
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Input is dead again

by rccarman on Sun Dec 20, 2015 1:36 am

Once again adafruit.io is failing to accept input:

Traceback (most recent call last):
File "therms.py", line 19, in <module>
aio.create_data('Therms', data)
File "C:\Python\3.4\lib\site-packages\adafruit_io-1.0.0-py3.4.egg\Adafruit_IO\client.py", line 144, in create_data
File "C:\Python\3.4\lib\site-packages\adafruit_io-1.0.0-py3.4.egg\Adafruit_IO\client.py", line 72, in _post
File "C:\Python\3.4\lib\site-packages\adafruit_io-1.0.0-py3.4.egg\Adafruit_IO\client.py", line 56, in _handle_error
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 500 Internal Server Error

rccarman
 
Posts: 14
Joined: Sun Sep 20, 2015 10:44 pm

Re: Input is dead again

by thedarkhawk on Sun Dec 20, 2015 8:20 am

Same Here, stopped around 12h ago..

thedarkhawk
 
Posts: 9
Joined: Fri Nov 20, 2015 2:21 pm

Re: Input is dead again

by jwcooper on Sun Dec 20, 2015 1:38 pm

Can you try again, should be back.

We're mitigating this by migrating to new servers, hopefully on Monday. Bigger, and more servers for IO soon.

jwcooper
 
Posts: 677
Joined: Tue May 01, 2012 9:08 pm

Re: Input is dead again

by pellico on Sat Jan 09, 2016 3:22 pm

UPDATE/SOLVED: I deleted my AIO account completely and created a new one and now it works.
FWIW, The previous/first account I'd filled up when I tried to create a feed and the dialog never went away so I clicked a number of times and when I manually closed the dialog my feed window was full of created feeds. Maybe that borked the account even though I deleted those feeds.

Is the standard Python Adafruit IO library supposed to work? Running Ubuntu 14.04 64bit and seem to be having problems.
I am trying out Adafruit-IO for the first time and getting 500 Internal Server Error on the simplest of things like creating a feed.

test0.py
Code: Select all | TOGGLE FULL SIZE
# Import library and create instance of REST client.
from Adafruit_IO import Client, Feed
aio = Client('_myAIOkeyHere_')

# Create Feed object with name 'Foo'.
feed = Feed(name='Bar')
#feed = Feed(name='Foo')

# Send the Feed to IO to create.
# The returned object will contain all the details about the created feed.
result = aio.create_feed(feed)


It creates a feed named Bar but gives this error:

Code: Select all | TOGGLE FULL SIZE
dlarue@myMachine:~/Projects/Arduino/BarometricSensor/AdafruitIO$ python test0.py
Traceback (most recent call last):
  File "test0.py", line 11, in <module>
    result = aio.create_feed(feed)
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 171, in create_feed
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 72, in _post
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 56, in _handle_error
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 500 Internal Server Error


I then manually add data element value "10" via web interface and then the read fails.
Code: Select all | TOGGLE FULL SIZE
# Author: Tony DiCola
# Import Adafruit IO REST client.
from Adafruit_IO import Client, Feed

# Set to your Adafruit IO key.
ADAFRUIT_IO_KEY = '-myAIOkeyHere-'

# Create an instance of the REST client.
aio = Client(ADAFRUIT_IO_KEY)

# Now read the most recent value from the feed 'Foo'.  Notice that it comes
# back as a string and should be converted to an int if performing calculations
# on it.
data = aio.receive(504993)
#data = aio.receive('Bar')
#data = aio.receive('bar')
print('Retrieved value from Foo has attributes: {0}'.format(data))
print('Latest value from Foo: {0}'.format(data.value))

# Send a string value 'bar' to the feed 'Foo', again creating it if it doesn't
# Send a value to the feed 'Foo'.  This will create the feed if it doesn't
# exist already.
#aio.send('Foo', 42)



output:
Code: Select all | TOGGLE FULL SIZE
dlarue@myMachine:~/Projects/Arduino/BarometricSensor/AdafruitIO$ python test1.py
Traceback (most recent call last):
  File "test1.py", line 17, in <module>
    data = aio.receive(504993)
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 106, in receive
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 63, in _get
  File "build/bdist.linux-x86_64/egg/Adafruit_IO/client.py", line 56, in _handle_error
Adafruit_IO.errors.RequestError: Adafruit IO request failed: 400 Bad Request

pellico
 
Posts: 28
Joined: Thu Aug 15, 2013 6:20 pm

Please be positive and constructive with your questions and comments.