Skip to content

save_text=False throws error on init #157

Closed
@sargunv

Description

@sargunv
label = Label(
    font=FONT,
    color=color,
    anchor_point=(0.0, 0.0),
    anchored_position=(column, 0),
    text=str,
    save_text=False,
)
  File "adafruit_display_text/bitmap_label.py", line 100, in __init__
  File "adafruit_display_text/bitmap_label.py", line 161, in _reset_text
  File "adafruit_display_text/bitmap_label.py", line 277, in _text_bounding_box
TypeError: 'NoneType' object is not iterable

I believe this is because that _reset_text function is using the property self._text instead of the local variable text in some (but not all) places.

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