adafruit / Adafruit_CircuitPython_RGB_Display

Drivers for RGB displays for Adafruit CircuitPython.
MIT License
129 stars 52 forks source link

rgb.py ValueError #117

Closed craigerl closed 7 months ago

craigerl commented 7 months ago

Following instructions at, https://learn.adafruit.com/adafruit-1-3-and-1-54-240-x-240-wide-angle-tft-lcd-displays/python-wiring-and-setup

Resulted in,

Traceback (most recent call last): File "/home/pi/./direwatch.py", line 305, in disp.image(image) File "/usr/local/lib/python3.11/dist-packages/adafruit_rgb_display/rgb.py", line 230, in image pix = color565(img.getpixel((i, j))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/adafruit_rgb_display/rgb.py", line 58, in color565 red, g, b = r ^^^^^^^^^ ValueError: too many values to unpack (expected 3)

Raspberry Pi OS Bookworm/12

curiously, -craig

craigerl commented 7 months ago

It looks like this code is avoided if numpy is installed. If we install numpy, it's fine.

sudo apt-get install python3-numpy

makermelissa commented 7 months ago

That's probably how it got overlooked.