You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I just updated my MagTag to the latest version of everything - Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit MagTag with ESP32S2
Now I get the following error:
File "adafruit_ntp.py", line 93, in _update_time_sync
OSError: [Errno 116] ETIMEDOUT
I created a simple test to replicate the problem using the example code: Adafruit_CircuitPython_NTP/examples/ntp_simpletest.py. The error does not always happen the first time I run it but usually on the 2nd or 3rd attempt, it crashes.
# SPDX-FileCopyrightText: 2022 Scott Shawcroft for Adafruit Industries
# SPDX-License-Identifier: MIT
"""Print out time based on NTP."""
import os
import time
import socketpool
import wifi
import adafruit_ntp
from adafruit_magtag.magtag import MagTag
magtag = MagTag()
URL = "https://swapi.dev/api/"
resp = magtag.network.fetch(URL)
print(resp.json())
print("*****************")
# Get wifi AP credentials from a settings.toml file
wifi_ssid = os.getenv("CIRCUITPY_WIFI_SSID")
wifi_password = os.getenv("CIRCUITPY_WIFI_PASSWORD")
if wifi_ssid is None:
print("WiFi credentials are kept in settings.toml, please add them there!")
raise ValueError("SSID not found in environment variables")
try:
wifi.radio.connect(wifi_ssid, wifi_password)
except ConnectionError:
print("Failed to connect to WiFi with provided credentials")
raise
pool = socketpool.SocketPool(wifi.radio)
ntp = adafruit_ntp.NTP(pool, tz_offset=0, cache_seconds=3600)
print(ntp.datetime)
The text was updated successfully, but these errors were encountered:
So I just updated my MagTag to the latest version of everything - Adafruit CircuitPython 9.1.4 on 2024-09-17; Adafruit MagTag with ESP32S2
Now I get the following error:
I created a simple test to replicate the problem using the example code:
Adafruit_CircuitPython_NTP/examples/ntp_simpletest.py
. The error does not always happen the first time I run it but usually on the 2nd or 3rd attempt, it crashes.The text was updated successfully, but these errors were encountered: