chrisb2 / pi_ina219

This Python library supports the INA219 voltage, current and power monitor from Texas Instruments with a Raspberry Pi using the I2C bus. The intent of the library is to make it easy to use the quite complex functionality of this sensor.
MIT License
114 stars 34 forks source link

not working on raspberrypiOS 32 bit #36

Open Micha-123 opened 1 year ago

Micha-123 commented 1 year ago

New RaspberryPI os,

installed python3 installed library

sudo pip3 install pi-ina219

that is installed successfuly but if i wil run the code

python ina219.py Traceback (most recent call last): File "/home/pi/ina219.py", line 3, in <module> from ina219 import INA219 File "/home/pi/ina219.py", line 3, in <module> from ina219 import INA219 ImportError: cannot import name 'INA219' from partially initialized module 'ina219' (most likely due to a circular import) (/home/pi/ina219.py)

chrisb2 commented 1 year ago

You seem to have an ina219.py file in your home directory, I think you should delete this. If it's your test code which interacts with the library rename it to something like test.py.

Chris