adafruit / Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux
MIT License
453 stars 340 forks source link

Jetson Nano -- AttributeError: module 'adafruit_platformdetect.constants.chips' has no attribute 'JH71x0' #821

Closed dorukcapraz closed 4 months ago

dorukcapraz commented 5 months ago

Hello,

I recently bought a BMP280 sensor and I try to use it with the circuitpython_BMP280 library. I installed required packages but when I run the example code it is failing on the below line and giving the following error. Can anyone help me to fix this? I am using python 3.6.9, could it be the issue?

The line which fails: i2c = board.I2C()

Error Code: _Traceback (most recent call last): File "", line 1, in File "/home/doruk/.local/lib/python3.6/site-packages/board.py", line 280, in I2C return busio.I2C(SCL, SDA) File "/home/doruk/.local/lib/python3.6/site-packages/busio.py", line 32, in init self.init(scl, sda, frequency) File "/home/doruk/.local/lib/python3.6/site-packages/busio.py", line 108, in init from microcontroller.pin import i2cPorts File "/home/doruk/.local/lib/python3.6/site-packages/microcontroller/init.py", line 65, in elif chip_id == ap_chip.JH71x0: AttributeError: module 'adafruitplatformdetect.constants.chips' has no attribute 'JH71x0'

makermelissa commented 5 months ago

First, make sure you have the latest PlatformDetect. I see you're also using Python 3.6. You can follow this guide to update it to 3.8, which will allow you to install the latest versions of Blinka/PlatformDetect: https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano/initial-setup#set-your-python-install-to-python-3-default-3039591

dorukcapraz commented 4 months ago

Thank you it worked for me with the python3.8!