Skip to content

Don't allocate a background bitmap when background_color is None #72

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
tannewt opened this issue Jul 22, 2020 · 2 comments · Fixed by #74
Closed

Don't allocate a background bitmap when background_color is None #72

tannewt opened this issue Jul 22, 2020 · 2 comments · Fixed by #74
Labels
bug Something isn't working

Comments

@tannewt
Copy link
Member

tannewt commented Jul 22, 2020

I'm getting this even when background_color is None.

  File "code.py", line 50, in <module>
  File "code.py", line 47, in <module>
  File "adafruit_pyportal.py", line 1028, in fetch
  File "adafruit_pyportal.py", line 601, in set_text
  File "adafruit_display_text/label.py", line 123, in __init__
  File "adafruit_display_text/label.py", line 295, in _update_text
  File "adafruit_display_text/label.py", line 205, in _update_background_color
  File "adafruit_display_text/label.py", line 162, in _create_background_box
MemoryError: memory allocation failed, allocating 3780 bytes
@FoamyGuy
Copy link
Contributor

I think this might be resolved with #71. I think _create_background_box is not getting called if background_color is None with those changes.

@FoamyGuy
Copy link
Contributor

Nope I was wrong. That is still getting called when background_color is None if custom font is used.

Thank you. I will get this fixed.

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
3 participants