Wikipedia icon indicating copy to clipboard operation
Wikipedia copied to clipboard

Max retries exceeded with url: /w/api.php?

Open dengwen168 opened this issue 4 years ago • 1 comments
trafficstars

I am using

import wikipedia result = wikipedia.summary(kw,sentences=10) but I get a error message:

HTTPSConnectionPool(host='en.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php?list=search&srprop=&srlimit=1&limit=1&srsearch=twotooth+achyranthes+root&srinfo=suggestion&format=json&action=query (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),))

How to solve this problem? thanks.

dengwen168 avatar Oct 07 '21 14:10 dengwen168

For me this was caused by a cloud security program that only allows SSL traffic verified with its own certificates (ZScaler). You can see how to put ZScaler's certificate into the one used by Python at https://community.zscaler.com/t/installing-tls-ssl-root-certificates-to-non-standard-environments/7261. You can see how to transform the cert into a .pem with https://knowledge.digicert.com/solution/SO26449.html.

karlkovaciny avatar Apr 12 '22 10:04 karlkovaciny