Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgb.py ValueError #117

Closed
craigerl opened this issue Nov 22, 2023 · 2 comments · Fixed by #118
Closed

rgb.py ValueError #117

craigerl opened this issue Nov 22, 2023 · 2 comments · Fixed by #118

Comments

@craigerl
Copy link

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
Copy link
Author

craigerl commented Nov 22, 2023

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
Copy link
Contributor

That's probably how it got overlooked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants