Skip to content

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

Closed
@mfinkle

Description

@mfinkle

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.

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