406 Not Acceptable | ThingSpeak API | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
406 Not Acceptable
No permission to create posts
February 28, 2014
11:53 pm
Avatar
CeC
New Member
Members
Forum Posts: 1
Member Since:
February 28, 2014
sp_UserOfflineSmall Offline

Hi-
I'm posting from a python script using urllib and the code below to update two channels every 15 seconds. For the past month or two it's been working fine and returning response.status == 200. It's still working fine (in that it is updating my channels) but starting yesterday it began returning response.status == 406 and response.reason "Not Acceptable"

Anyone know why suddenly ThingSpeak is returning 406?

Thanks-
CeC
Confused
params = urllib.urlencode({'field1': v1, 'field2': v2, 'field3' : v3, 'field4' : v4, 'field5' : v5, 'key': myKey})
headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
conn = httplib.HTTPConnection("api.thingspeak.com:80")
conn.request("POST", "/update", params, headers)
response = conn.getresponse()
if response.status != 200:
print "ThingSpeak: ", response.status, response.reason
data = response.read()
conn.close()

March 1, 2014
12:33 pm
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi,

This should be fixed now, can you let us know if it's working correctly for you again? We added JSON and XML responses, but didn't handle TEXT responses correctly in a recent update.

lee

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
30 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

tran, huldacormier, bogart, estebanmateo93, mikewrite, onlinebusiness

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457