On PyPortal can't set attribute 'auto_brightness'

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ghulse
 
Posts: 97
Joined: Tue Nov 30, 2021 10:49 am

On PyPortal can't set attribute 'auto_brightness'

Post by ghulse »

I recently updated CircuitPython on my PyPortal from 7.x to 8.0.3. My moon phase program that used to work fine now throws up this error:

Traceback (most recent call last):
File "code.py", line 384, in <module>
File "adafruit_pyportal/__init__.py", line 183, in __init__
File "adafruit_pyportal/peripherals.py", line 92, in __init__
File "adafruit_pyportal/peripherals.py", line 141, in set_backlight
AttributeError: can't set attribute 'auto_brightness'

line 384 in the code is: pyportal = PyPortal()

Any suggestions?

User avatar
danhalbert
 
Posts: 4613
Joined: Tue Aug 08, 2017 12:37 pm

Re: On PyPortal can't set attribute 'auto_brightness'

Post by danhalbert »

It sounds like your libraries are out of date. Auto-brightness setting was removed from the PyPortal library last August. You can download the latest bundle and update manually, or you can use the "circup" tool: https://learn.adafruit.com/keep-your-ci ... ith-circup

User avatar
ghulse
 
Posts: 97
Joined: Tue Nov 30, 2021 10:49 am

Re: On PyPortal can't set attribute 'auto_brightness'

Post by ghulse »

Thanks, the circup tool updated all libraries. Thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”