question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot import name INA219

See original GitHub issue
pi@raspberrypi:~/shabi/python$ python ina219.py
Traceback (most recent call last):
  File "ina219.py", line 4, in <module>
    from ina219 import INA219
  File "/home/pi/shabi/python/ina219.py", line 4, in <module>
    from ina219 import INA219
ImportError: cannot import name INA219

and I tried to pip3 install it but same error occurred. How can I fix it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
remoengineercommented, Sep 15, 2019

I know this is closed, but in case anyone else ends up here with this error, the interpreter picked up his ina219.py as the module instead of his test program. Simply rename the test program to something like ina219_test.py and it should get well.

0reactions
chrisb2commented, May 14, 2019

OK, good to hear you got it working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

help with ina_219 code- "cannot import name 'INA219' "
help with ina_219 code- "cannot import name 'INA219' ". Thu Oct 22, 2020 12:16 pm. hello. I have downloaded the pi-ina219 from pip....
Read more >
INA219 python library - Page 5 - Adafruit forums
-using B+ ina219 on i2c works fine, no issue -using Pi2 + ina219 I have the ... Inport error: no module named Subfact_ina219...
Read more >
pi-ina219 - PyPI
This Python library for Raspberry Pi makes it easy to leverage the complex functionality of the Texas Instruments INA219 sensor to measure voltage,...
Read more >
INA219 directly on i2c of Pi without ESP8266 - OpenMarine
I can't however for the life of me get these values into SignalK. The current available tools ... ImportError: cannot import name INA219....
Read more >
HiLetgo INA219 I2C IIC Bi-Directional DC Current Power ...
HiLetgo INA219 I2C IIC Bi-Directional DC Current Power Supply Sensor Breakout Module Power Monitoring Sensor: Amazon.com: Industrial & Scientific.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found