tgherzog / wbgapi

Python module that makes using the World Bank's API a lot easier and more intuitive.
MIT License
140 stars 31 forks source link

SSLError: HTTPSConnectionPool(host='api.worldbank.org', port=443) #31

Closed passerby753 closed 1 year ago

passerby753 commented 1 year ago

API returns this error and does not work since 2023/5/16 CET.

SSLError: HTTPSConnectionPool(host='api.worldbank.org', port=443): Max retries exceeded with url: /v2/en/sources/2/concepts?per_page=1000&page=1&format=json (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)')))

tgherzog commented 1 year ago

This usually indicates a server side issue that often resolves quickly. It seems to be working for me at the moment. Can you test again, and if you still have problems, post the code you are trying to run?

tgherzog commented 1 year ago

It could also be a problem in your local HTTPS config. Try running this code. If it also fails then the problem is in your local config.

>>> import requests
>>> response = requests.get('https://api.worldbank.org/v2/en/sources/2/concepts?per_page=1000&page=1&format=json')
>>> response.json()
[snip]
>>> response = requests.get('https://github.com')
>>> response.content[:200]
[snip]
passerby753 commented 1 year ago

It started to work again. Thank you very much for your help!