SLIGHTLY DIFFERENT ERRORS

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

SLIGHTLY DIFFERENT ERRORS

Post by KJM » Sat Jun 04, 2022 2:13 am

Something weird happening with urequests, sometimes I get

Code: Select all

File "<stdin>", line 80, in uequests OSError: [Errno 104] ECONNRESET
and other times

Code: Select all

File "<stdin>", line 80, in urequests OSError: -104
I've got a hunch that the first version is what happens when the server closes the socket and the second is maybe when it simply doesn't reply but I'm not sure.

I'd welcome any comments from someone more knowledgeable about error subtlety than me.

ChrisO
Posts: 48
Joined: Mon Apr 06, 2020 6:16 pm

Re: SLIGHTLY DIFFERENT ERRORS

Post by ChrisO » Fri Jun 10, 2022 11:27 am

Hi,

I'm responding since you asked me about it.
Unfortunately I do not have an answer for you.
I suspect there's slight inconsistencies in the underlying C modules so the specific reason might be platform/port specific. (maybe you can share that info)
Seems like you should at least be able to compare the errno, so programatically it should not make much of a difference.
Chris

Post Reply