certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)

Viewed 4637

I have tried to use 'googletrans', but my comput

httpcore._exceptions.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: self signed certificate in certificate chain
(_ssl.c:1129)

This is my code.

from googletrans import Translator
translator = Translator()
print(translator.translate('안녕하세요', src='ko', dest='en'))
1 Answers

You may check your certificate first, you can find your current certificate store by:

import certifi
certifi.where()

In my case, the result is: C:\Users\fenix\AppData\Local\Programs\Python\Python39\lib\site-packages\certifi\cacert.pem on windows, or /usr/local/lib/python3.6/site-packages/certifi/cacert.pem on Centos

And check if GlobalSign Root CA is in it, if not you need to add it.

Related