Skip to content
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

fix: make sure to run fonts.init() so preview.py works #1138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

therocco
Copy link
Contributor

@therocco therocco commented Jan 21, 2023

Signed-off-by: Rocco Augusto therocco@users.noreply.github.com

Description

While trying to run the scripts/preview.py script to locally test some template modifications I was making for myself I discovered it was erroring out due to an AttributeError: NoneType in pwnagotchi/ui/fonts.py on line 27

Motivation and Context

  • I have raised an issue to propose this change (required)

I wanted to play around with the preview.py script and could not do so in it's current state.

How Has This Been Tested?

I have generated many screen demos testing it once it was fixed as seen in the attached images.

FIXES #1137

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

fonts.init() was never being called in the preview.py script so variables that the font module relied on were all NoneType

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

No documentation change is required since now the script is working as it is supposed to from the documentation I saw prior.

waveshare213inb_v4

waveshare_v2

ws1-ws2-ws2v4

Signed-off-by: Rocco Augusto <therocco@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

[BUG] preview.py script throws an AttributeError
1 participant