I'm working on a sensing project and have hit an error that I can't resolve. When run from the terminal with ./programname the program works fine - reads and displays the sensor info and terminates correctly. When run from IDLE3 I get the following:
Traceback (most recent call last):
File "/home/pi/Documents/Python Project/simpletest2.py", line 62, in <module>
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 94, in read_retry
humidity, temperature = read(sensor, pin, platform)
File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 80, in read
platform = get_platform()
File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/common.py", line 55, in get_platform
from . import Raspberry_Pi_2
File "/home/pi/Adafruit_Python_DHT/Adafruit_DHT/Raspberry_Pi_2.py", line 22, in <module>
from . import Raspberry_Pi_2_Driver as driver
ImportError: cannot import name 'Raspberry_Pi_2_Driver'
Is this an issue with IDLE3? i've added the path containing the Driver to sys.path. Although i note that it says 'cannot import' rather than 'cannot find'.
its a Pi3 and the sensing code is from Adafruit.
It's not a huge deal because as I say, the program works when run from the terminal, it's just puzzling me why the error is thrown up when working in IDLE3
Thanks
Phil