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

TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t' #115

Open
CrabbyPete opened this issue Sep 4, 2024 · 1 comment · May be fixed by #119
Open

TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t' #115

CrabbyPete opened this issue Sep 4, 2024 · 1 comment · May be fixed by #119

Comments

@CrabbyPete
Copy link

I am running on a headless 64bit bookworm version of Raspberry Pi OS. I am running it on a "Raspberry Pi 3 Model A Plus Rev 1.1", so I had to edit rpihw.c to include it. When I run the code I get the following:

File "/home/pi/pilotmap/lib/python3.11/site-packages/rpi_ws281x-5.0.0-py3.11-linux-aarch64.egg/rpi_ws281x/rpi_ws281x.py", line 155, in setPixelColor
self[n] = color
~~~~^^^
File "/home/pi/pilotmap/lib/python3.11/site-packages/rpi_ws281x-5.0.0-py3.11-linux-aarch64.egg/rpi_ws281x/rpi_ws281x.py", line 118, in setitem
return ws.ws2811_led_set(self._channel, pos, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'ws2811_led_set', argument 3 of type 'uint32_t'

@lbt
Copy link

lbt commented Dec 1, 2024

Were you using numpy or slices at all?
You may find you need to cast your value variable to an int.

@lbt lbt linked a pull request Dec 1, 2024 that will close this issue
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