11:53 pm

February 28, 2014

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
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()
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, onlinebusinessModerators: cstapels: 460
Administrators: Hans: 405, lee: 457