mklements / OLED_Stats_Docker

OLED Stats display script and settings for Docker implementation
27 stars 5 forks source link

NameError: name 'led' is not defined #8

Open Cazper1982 opened 11 months ago

Cazper1982 commented 11 months ago

Installed through an app template:

NameError: name 'led' is not defined Traceback (most recent call last): File "/opt/stats/stats.py", line 39, in oled = adafruit_ssd1306.SSD1306_I2C(width, height, board.I2C(), addr=0x3C, reset=digitalio.DigitalInOut(board.D4)) ^^^^^^^^^^^ File "/opt/venv/lib/python3.11/site-packages/board.py", line 372, in I2C return busio.I2C(SCL, SDA) ^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.11/site-packages/busio.py", line 35, in init self.init(scl, sda, frequency) File "/opt/venv/lib/python3.11/site-packages/busio.py", line 157, in init raise ValueError( ValueError: No Hardware I2C on (scl,sda)=(3, 2) Valid I2C ports: ((1, 3, 2), (0, 1, 0), (10, 45, 44)) Exception ignored in atexit callback: <function exit_handler at 0x7f8ebec4a0> Traceback (most recent call last): File "/opt/stats/stats.py", line 19, in exit_handler led.fill(0) ^^^