(Nov-21-2021, 10:48 PM)bowlofred Wrote: That should work if the OSError is the exception thrown. Can you show the actual code and a traceback where it doesn't work?
code which is the culprit:
try:
blynk = BlynkLib.Blynk(BLYNK_AUTH,
insecure=False, # disable SSL/TLS
server='blynk.cloud', # set server address
port=443, # set server port
heartbeat=30, # set heartbeat to 30 secs
log=False # use print function for debug logging
)
except OSError as e:
print('ERROR***', e)
#machine.reset()
error:
Error:
Connecting to blynk.cloud:443...
Blynk disconnected
Connecting to fra1.blynk.cloud:443...
Traceback (most recent call last):
File "<stdin>", line 109, in <module>
File "<stdin>", line 103, in runLoop
File "BlynkLib.py", line 261, in run
File "BlynkLib.py", line 202, in process
File "BlynkLib.py", line 68, in emit
File "BlynkLib.py", line 221, in redirect
File "BlynkLib.py", line 240, in connect
OSError: [Errno 12] ENOMEM
There's an intentional error in the code which is cousing the lib to crush.
I just want to know why my print line is not reached or how to fix it. Because, in a eventual real crush, the PLC/microcontroller needs to reset.
Thanks.