gustavo-hsm / PoE_TradeLedger

Tools to query and track public offers listed on Path of Exile's Trade API
1 stars 0 forks source link

ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1076) #4

Closed gustavo-hsm closed 4 years ago

gustavo-hsm commented 4 years ago

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/opt/poetl/venv/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/opt/poetl/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/opt/poetl/venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.pathofexile.com', port=443): Max retries exceeded with url: ... (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)')))

gustavo-hsm commented 4 years ago

Something probably went wrong on the server side. 'Requests' errors/exceptions will be properly handled on the next release.

gustavo-hsm commented 4 years ago

I made a new class to help handling such errors, mentioned on the commit above (7cb894d).

I'm not entirely sure about the best approach for each error, but it all seems to boil down to either a) wait and try again later (Timeout, Server error, etc) or b) shutdown completely (Invalid URL, Unauthorized, etc).

I'll keep expanding this class as I'm able to catch new error cases.