'How to disable the security certificate check for Google Translate
I have to use google translator API to translate Japanese to English for my NLTP project. This is the sample code I am using:
from googletrans import Translator
translator = Translator()
translator.translate('学生')
I am getting an SSL certificate error:
ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)
I know I have to disable the security certificate check. How to do this for Google Translate module?
I tried this and it is not working-
import requests, os
session = requests.Session()
session.verify = False
session.trust_env = False
Please, help! Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|