tab_layout returns AttributeError for width when using HSTX display
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- embedded-iot
Research direction
Start with the failing Tab Layout Simple test using the Feather RP2350 HSTX display, then inspect lib/adafruit_displayio_layout/layouts/tab_layout.py at _draw_tabs (line 152) and add_content (line 203). Reproduce the NoneType width error and verify the fix works with the built-in display without breaking boards that already have a display.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 13
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from adafruit/Adafruit_CircuitPython_DisplayIO_Layout
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
adafruit/Adafruit_CircuitPython_DisplayIO_Layout#63 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
adafruit/Adafruit_CircuitPython_DisplayIO_Layout#49 · 5 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
adafruit/Adafruit_CircuitPython_DisplayIO_Layout#19 · 24 comments ·
All issues in adafruit/Adafruit_CircuitPython_DisplayIO_Layout
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100