szazo / DHT11_Python

Pure Python library for reading DHT11 sensor on Raspberry Pi
MIT License
301 stars 227 forks source link

dht11_example.py used #12

Open patilomkar865 opened 5 years ago

patilomkar865 commented 5 years ago

pi@raspberrypi:~ $ python dht11.py Traceback (most recent call last): File "dht11.py", line 2, in import dht11 File "/home/pi/dht11.py", line 12, in instance = dht11.DHT11(pin=14) AttributeError: 'module' object has no attribute 'DHT11'

jacobfister commented 4 years ago

I have the same issue. Couldn't figure out why.

mikitachab commented 4 years ago

please try to change name of a script file to something different from library name you want to use.

Oosl commented 3 years ago

please try to change name of a script file to something different from library name you want to use.

Thanks! it works.