ubopod / ubo-hal

This repo includes code for communicating and interfacing with Ubo hardware peripherals
GNU General Public License v3.0
1 stars 2 forks source link

board.SPI() is not found or working properly #9

Closed jpsainfeld closed 1 year ago

jpsainfeld commented 1 year ago

python3 light_sensor_example.py Traceback (most recent call last): File "/home/pi/ubo-sdk/light_sensor/light_sensor_example.py", line 10, in lcd = LCD() File "/home/pi/ubo-sdk/light_sensor/../display/lcd.py", line 98, in init spi = board.SPI() AttributeError: module 'board' has no attribute 'SPI'

Seems like this issue happens if adafruit-blinks is not installed properly. The solution is to force reinstall this package. fix:

pip install --force-reinstall adafruit-blinka

zytegalaxy commented 1 year ago

it seems like that sometimes for some unknown reason adafruit-blinka does not get installed completely (fails during install most likely due to dependency issues). I confirm the suggested fix do work:

pip install --force-reinstall adafruit-blinka

I am looking into how to improve pip package install reliability with using Poetry as a possible solution. If you have any suggestions, please do let know.

zytegalaxy commented 1 year ago

I made a new issue for "improving reliability of pip packages": https://github.com/ubopod/ubo-sdk/issues/12