Reputation: 13
deep_translator version: 1.9.1
Python version: 3.9
Operating System: Win 11
My Code:
from deep_translator import GoogleTranslator
translator = GoogleTranslator(source='en', target='pt')
data = 'my name is python'
translator.translate(data)
Error:
ERROR out: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=pt&sl=en&q=my+name+is+python(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)')))
Upvotes: 0
Views: 492
Reputation: 1
Cause
The issue occurs because of an expired "DST Root CA X3" certificate. The details of certificate remediation are at the link, https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
Somehow python SSL libraries are not able to correctly work with this certificate though the browsers are ok.
Remediation
Delete the certificate "DST Root CA X3" from all the certificate stores it might exist in. This will resolve the issue.
Details
For details of why this issue occurs and access to some tools for further details, look at the README file at this location https://github.com/vivekuppal/transcribe/tree/main/examples/deepgram
This link talks about Deepgram API related issues for SSL Verification failures, though the underlying cause is the same.
Upvotes: 0