AttributeError: module 'thingspeak' has no attribute 'Channel' channel = thingspeak.Channel(id=channel_id, api_key=key)
7 views (last 30 days)
Show older comments
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 Comments
Answers (0)
Communities
More Answers in the ThingSpeak Community
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!