Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

PyPortal and CircuitPython 5
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PyPortal and CircuitPython 5

by combs on Wed Mar 18, 2020 3:41 pm

Hello! Following along here,
https://learn.adafruit.com/adafruit-pyportal?view=all

I updated my PyPortal (Adabox version) to CircuitPython 5 and installed the default PyPortal files. They crash out immediately with a "Please update your library bundle to the latest 'adafruit_display_text' version as we've deprecated 'text_area' in favor of 'label'" error

I don't see anything like that in code.py. Is it possible to update the "default PyPortal files" download to work with CircuitPython 5?

Many thanks,
Chris

combs
 
Posts: 22
Joined: Fri Feb 01, 2013 5:23 pm

Re: PyPortal and CircuitPython 5

by combs on Wed Mar 18, 2020 3:47 pm

P.S., I tried updating the libraries myself. The PyPortal example code shows the logos, plays the sound, then yacks out during the "Making text area" with a NameError:

Code: Select all | TOGGLE FULL SIZE
File "code.py", line 34, in <module>
File "code.py", line 31, in <module>
File "adafruit_pyportal.py", line 1035, in fetch
File "adafruit_pyportal.py", line 618, in set_text
NameError: Name "Label" is not defined


since this seems to be in the library, not sure how to fix...
thanks for any help you can offer!

combs
 
Posts: 22
Joined: Fri Feb 01, 2013 5:23 pm

Re: PyPortal and CircuitPython 5

by kattni on Thu Mar 19, 2020 4:38 pm

Are you certain you updated all of the necessary libraries? It is possible that you are running an older version of Adafruit Display Text. The library tries to import the older version first to purposely fail so it can inform you that you need to update, and then imports the proper version. If the proper version is never imported, then Label would be undefined.

Please make sure you are running the latest version of Adafruit Display Text and see if that resolves your issue.

kattni
 
Posts: 75
Joined: Fri Aug 18, 2017 6:33 pm

Please be positive and constructive with your questions and comments.