0

Recently I ran an updated version of the joy_detection_demo and I added a few lines which would stream data to ThingSpeak. However, I used the urllib2 library as:

from urllib.request import urlopen

yet it says in error:

f = urllib2.urlopen(groundURL + PRIVATE_KEY +"&field1=%s" % (joy_score))

NameError: name 'urllib2' is not defined

I am using Python 3.7 on Raspberry Pi, if you need more lines please tell me.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
AxiomOfTruth
  • 315
  • 1
  • 2
  • 10

0 Answers0