Skip to content

Null Error from resize when text is blank #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
FoamyGuy opened this issue Oct 26, 2024 · 0 comments · Fixed by #46
Closed

Null Error from resize when text is blank #45

FoamyGuy opened this issue Oct 26, 2024 · 0 comments · Fixed by #46
Labels
bug Something isn't working

Comments

@FoamyGuy
Copy link

reported on discord

I'm working with CircuitPython on a Feather RP2040. Trying to work out displayio and associated libraries, adafruit_displayio_layout is giving me some trouble.
I started with this example code which worked once I set it up for my display. https://docs.circuitpython.org/projects/displayio-layout/en/latest/examples.html#gridlayout-simple-text) Then I modified it to add buttons to the grid instead of labels, which the docs for GridLayout says are a valid kind of content, but I'm getting errors that I can't make heads or tails of.

code.py output:
Traceback (most recent call last):
  File "code.py", line 65, in <module>
  File "adafruit_displayio_layout/layouts/grid_layout.py", line 403, in add_content
  File "adafruit_displayio_layout/layouts/grid_layout.py", line 145, in _layout_cells
  File "adafruit_button/button.py", line 284, in resize
  File "adafruit_button/button_base.py", line 81, in label
AttributeError: 'NoneType' object has no attribute 'text'

Code done running.
@FoamyGuy FoamyGuy added the bug Something isn't working label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant