Closed dbrgn closed 6 years ago
I'm using the LoPy with firmware 1.7.3.b2.
Some functions like LoRa.join raise a TimeoutError if something fails. Python includes that exception since 3.3.
LoRa.join
TimeoutError
You define the exception in py/objexcept.c:
py/objexcept.c
MP_DEFINE_EXCEPTION(TimeoutError, OSError)
I can catch the exception raised by the LoRa class:
>>> try: ... lora.lora.join(activation=LoRa.OTAA, auth=lora.auth, timeout=1) ... except Exception as ee: ... foo = ee ... >>> foo TimeoutError('timed out',) >>> foo.__class__ <class 'TimeoutError'>
...but the class does not exist in the global namespace!
>>> TimeoutError Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'TimeoutError' is not defined
Hello,
Thanks for reporting, the fix will be part of the next development release.
I'm using the LoPy with firmware 1.7.3.b2.
Some functions like
LoRa.join
raise aTimeoutError
if something fails. Python includes that exception since 3.3.You define the exception in
py/objexcept.c
:I can catch the exception raised by the LoRa class:
...but the class does not exist in the global namespace!