0
Get Errorno from MaxRetryError
Hi, I would like to know how I can get the error number from an exception urllib3.exceptions.MaxRetryError ? There are several members inside, such as NewConnectionError in e.reason or HTTPSConnectionPool in e.pool, but I can't find the member that returns the error number Errorno 11001
1 Odpowiedź
0
Typically for this type of thing you would consult the documentation for the package that returns the exception. In this case, you are using urllib3. These things can take some trial and error or google search to find a solution. It can be very frustrating. Instead of the errorno, it's better to search by the name of the exception, NewConnectionError.
I Googled urllib3 NewConnectionError
I found this:
Documentation: https://urllib3.readthedocs.io/en/stable/reference/urllib3.exceptions.html
This documentation states: Raised when we fail to establish a new connection. Usually ECONNREFUSED.
Discussion of your exception: https://stackoverflow.com/questions/16230850/httpsconnectionpool-max-retries-exceeded