Skip to content

Problem with individual_pixels set to True #1

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
gamblor21 opened this issue Dec 1, 2022 · 0 comments · Fixed by #3
Closed

Problem with individual_pixels set to True #1

gamblor21 opened this issue Dec 1, 2022 · 0 comments · Fixed by #3

Comments

@gamblor21
Copy link
Member

If done with a tuple:

>>> mymap = PixelMap(pixels, (0,1,2,3,4,5), individual_pixels=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_pixelmap.py", line 124, in __init__
TypeError: indices must be of type tuple

If done with a list:

>>> mymap = PixelMap(pixels, [0,1,2,3,4,5], individual_pixels=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_pixelmap.py", line 112, in __init__
  File "adafruit_pixelmap.py", line 113, in <genexpr>
TypeError: 'int' object is not iterable

Looking I believe even after fixing the initial issue there is another error in _expand_ranges also when individual_pixels set.

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