(Sep-21-2020, 05:48 PM)JarredAwesome Wrote: Here is what is in the modules __init__.py fileI know what's in
__init__.py
- that's why I show it to you. In my code I import the module w1thermsensor
and then fully reference the W1ThermSensor
and NoSensorFoundError
If you prefer
from w1thermsensor import W1ThermSensor
, then it should befrom w1thermsensor import W1ThermSensor, NoSensorFoundError try: sensor = W1ThermSensor(W1ThermSensor.THERM_SENSOR_DS18B20, '0300a27989945') except NoSensorFoundError: print('Thermometer not Found')
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs