adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout
tab_layout returns AttributeError for width when using HSTX display
- Vorherrschende Sprache
- Python
- Sterne
- 13
- Forks
- 16
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Using Feather RP2350 with an HSTX display running the Tab Layout Simple test with display is set up using:
`if hasattr(supervisor. Runtime, "display") and supervisor.runtime.display is not None:
# use the built-in HSTX display for Metro RP2350
display = supervisor.runtime.display`
Getting error:
`File "/lib/adafruit_displayio_layout/layouts/tab_layout.py", line 203, in add_content
File "/lib/adafruit_displayio_layout/layouts/tab_layout.py", line 152, in _draw_tabs
AttributeError: 'NoneType' object has no attribute 'width'`
I was able to get it to work by editing the file - see attached screenshot.
Not sure if this will break boards with built in display.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit dem fehlschlagenden Tab Layout Simple-Test unter Verwendung des Feather RP2350 HSTX display, untersuche anschließend lib/adafruit_displayio_layout/layouts/tab_layout.py bei _draw_tabs (Zeile 152) und add_content (Zeile 203), und füge die Änderung hinzu. Reproduziere den NoneType width-Fehler und verifiziere, dass der Fix mit dem integrierten display funktioniert, ohne Boards zu beeinträchtigen, die bereits ein display haben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- embedded-iot
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100