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
There's an open issue, #53 about failing to connect with DHCP, but that is about constantly failing, and I don't want to hijack it.
I recently had this happen:
code.py output:
starting...
Traceback (most recent call last):
File "code.py", line 29, in <module>
File "/lib/adafruit_wiznet5k/adafruit_wiznet5k.py", line 207, in __init__
AssertionError: Failed to configure DHCP Server!
Code done running.
This is new for me, as DHCP usually works, and I was testing code by having it run for hours unattended, and having it soft reset the board when it reached its success state. DHCP was back to working again when I restarted the program.
These are the last lines of the __init__ block for the WIZNET5K object. While failing to configure DHCP is not ideal, it's also not assertion worthy. It's calling set_dhcp() which has a timeout and return codes, so failure was an expected outcome.
The real issue here is throwing AssertionError for something that is not invariant; failures happen, this should raise an exception, and probably incorporate some retries first, but definitely not make any assertions.
The current user workaround to prevent hanging here would be to try...except AssertionError around constructing WIZNET5K, which is disappointing.
The text was updated successfully, but these errors were encountered:
There's an open issue, #53 about failing to connect with DHCP, but that is about constantly failing, and I don't want to hijack it.
I recently had this happen:
This is new for me, as DHCP usually works, and I was testing code by having it run for hours unattended, and having it soft reset the board when it reached its success state. DHCP was back to working again when I restarted the program.
The code in
adafruit_wiznet5k.py
:Adafruit_CircuitPython_Wiznet5k/adafruit_wiznet5k/adafruit_wiznet5k.py
Lines 198 to 203 in 450c52e
These are the last lines of the
__init__
block for theWIZNET5K
object. While failing to configure DHCP is not ideal, it's also not assertion worthy. It's callingset_dhcp()
which has a timeout and return codes, so failure was an expected outcome.The real issue here is throwing AssertionError for something that is not invariant; failures happen, this should raise an exception, and probably incorporate some retries first, but definitely not make any assertions.
The current user workaround to prevent hanging here would be to
try...except AssertionError
around constructingWIZNET5K
, which is disappointing.The text was updated successfully, but these errors were encountered: