8000 precompute_rainbow=False causes an error in rainbow.py · Issue #76 · adafruit/Adafruit_CircuitPython_LED_Animation · GitHub
[go: up one dir, main page]

Skip to content

precompute_rainbow=False causes an error in rainbow.py #76

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

Closed
mfinkle opened this issue Apr 28, 2021 · 0 comments · Fixed by #120
Closed

precompute_rainbow=False causes an error in rainbow.py #76

mfinkle opened this issue Apr 28, 2021 · 0 comments · Fixed by #120

Comments

@mfinkle
Copy link
mfinkle commented Apr 28, 2021

Rainbow initializes self.colors = None

_color_wheel_generator then tries to get the length

When using precompute_rainbow=False this will cause an error:
TypeError: object of type 'NoneType' has no len()

Initializing self.colors = [] should still work in the truthy test or moving the wheel_index calculation into the if self.colors block could fix it too.

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.

1 participant
0