Description
Calls to pyportal.get_local_time(secrets["timezone"])
fail with error:
File "/lib/adafruit_portalbase/__init__.py", line 403, in get_local_time
File "/lib/adafruit_portalbase/network.py", line 233, in get_local_time
File "/lib/adafruit_portalbase/network.py", line 216, in get_strftime
File "/lib/adafruit_portalbase/network.py", line 202, in get_strftime
AttributeError: 'NoneType' object has no attribute 'get'
Printing on L198 (https://github.com/adafruit/Adafruit_CircuitPython_PortalBase/blob/main/adafruit_portalbase/network.py#L198):
print(self._wifi)
print(dir(self._wifi))
print(self._wifi.requests)
Yields a None
type for self._wifi.requests
.
Getting time for timezone Etc/UTC
<WiFi object at 20003fe0>
['__class__', '__dict__', '__init__', '__module__', '__qualname__', 'connect', 'enabled', 'requests', 'esp', 'is_connected', 'neo_status', 'manager', 'neopix', '_manager']
None
Example code for where this occurs: https://learn.adafruit.com/pyportal-google-calendar-event-display/code-usage