Skip to content

macropad_grid_layout example not working #10

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
joedevivo opened this issue Jul 24, 2021 · 4 comments
Closed

macropad_grid_layout example not working #10

joedevivo opened this issue Jul 24, 2021 · 4 comments
Assignees

Comments

@joedevivo
Copy link

Using the 2021 07 24 adafruit bundle, I get the following error

code.py output:
Traceback (most recent call last):
  File "code.py", line 33, in <module>
  File "adafruit_displayio_layout/layouts/grid_layout.py", line 118, in add_content
  File "adafruit_displayio_layout/layouts/grid_layout.py", line 85, in _layout_cells
AttributeError: 'Label' object has no attribute 'width'
@FoamyGuy
Copy link
Contributor

I think this is due to some refactoring that occurred recently in the display_text library. I will work on a fix for this today.

In the meantime I think if you get a slightly older verison of the display_text library from the previous releases page: https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/releases/tag/2.18.6 it will not have the same error. You can download the mpy version that matches the major version of CircuitPython you are using and copy it to your device the same way that you would the one that you got out of the bundle.

@joedevivo
Copy link
Author

Thanks, 2.18.6 worked perfectly. Looking forward to all the keyboard fun 😄

@lesamouraipourpre
Copy link
Contributor

Can you copy in the output of circup freeze to confirm what versions are on your device please?

If you need to install circup it's just pip3 install circup

@FoamyGuy
Copy link
Contributor

@joedevivo This has been fixed now. It turned out that the fix was actually needed inside the DisplayIO_Layout library.

It will get automatically included in the Bundle starting tomorrow. So you could grab versions from there starting tomorrow. Or if you want to get it today you can take the latest release from the Layout library release page here: https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout/releases/tag/1.10.2

Once you have this new version of the Layout library you could go back to using the latest version of Display_Text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants