AttributeError: module 'thingspeak' has no attribute 'Channel' channel = thingspeak.Channel(id=channel_id, api_key=key)
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
In the example raspberry pi py script, which was working fine, now i am getting this error. Cant find any sililar issues on the net... any ideas peeps?
import thingspeak
import time
channel_id = 1231234 # PUT CHANNEL ID HERE
key = '123123123123' # PUT YOUR WRITE KEY HERE
pin = 4
def measure(channel):
try:
# write
response = channel.update({'field1': 2, 'field2': 1})
# read
read = channel.get({})
print("Read:", read)
except:
print("connection failed")
if __name__ == "__main__":
channel = thingspeak.Channel(id=channel_id, api_key=key)
while True:
measure(channel)
# free account has an api limit of 15sec
time.sleep(15)
2 Kommentare
Antworten (0)
Communitys
Weitere Antworten in ThingSpeak Community
Siehe auch
Kategorien
Mehr zu ThingSpeak finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!