Skip to content

Problem with individual_pixels set to True #1

Closed
@gamblor21

Description

@gamblor21

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions