0

Adafruit Io responding with 404
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.

Adafruit Io responding with 404

by douglaso on Mon May 03, 2021 12:59 pm

This seemed to start happening recently to working code: "Adafruit_IO.errors.RequestError: Adafruit IO request failed: 404 Not Found - not found - that is an invalid URL". Is this happening to anyone else? Here's the Python:

Code: Select all | TOGGLE FULL SIZE
from Adafruit_IO import Client

ADAFRUIT_IO_USERNAME =  <redacted>
ADAFRUIT_IO_KEY =               <redacted>
AIO_FEED_KEY =  "fred"

aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY)
aio.send(aio.feeds(AIO_FEED_KEY), 88.88)

douglaso
 
Posts: 17
Joined: Tue Mar 12, 2013 12:36 am

Re: Adafruit Io responding with 404

by brubell on Wed May 05, 2021 11:08 am

What library are you using?

brubell
 
Posts: 1381
Joined: Fri Jul 17, 2015 10:33 pm

Re: Adafruit Io responding with 404

by douglaso on Wed May 05, 2021 12:19 pm

Code: Select all | TOGGLE FULL SIZE
from Adafruit_IO import Client

douglaso
 
Posts: 17
Joined: Tue Mar 12, 2013 12:36 am

Re: Adafruit Io responding with 404

by brubell on Thu May 06, 2021 4:32 pm

You need to create a new feed object like this:
Code: Select all | TOGGLE FULL SIZE
fred = aio.feeds('fred')


So, in your code...
Code: Select all | TOGGLE FULL SIZE
from Adafruit_IO import Client

ADAFRUIT_IO_USERNAME =  <redacted>
ADAFRUIT_IO_KEY =               <redacted>
AIO_FEED_KEY =  "fred"

aio = Client(ADAFRUIT_IO_USERNAME, ADAFRUIT_IO_KEY)


fred = aio.feeds('fred')


aio.send_data(fred.key, 88.88)

brubell
 
Posts: 1381
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.