forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
From @nnja:
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text.label import Label
class TextArea(Label):
def __init__(self):
self.x = 5 # what causes the PyPortal to boot in safe mode
font = bitmap_font.load_font("/fonts/Helvetica-Bold-36.bdf")
super().__init__(font, max_glyphs=3)
text = TextArea()
Comment out line 7 to stop the crash. I made a new class that inherits from Label. everything is fine until I try to set some instance variables on the child class. that's when the PyPortal goes into safe mode
anyway, I eventually figured out it's because of a conflict in what Label inherits from, http://displayio.Group -- but weird that there's no stack trace or anything. Just safe mode.