desbma / GoogleSpeech

Read text using Google Translate TTS API
GNU Lesser General Public License v2.1
161 stars 37 forks source link

SSL verify failed #10

Closed lkthomas closed 6 years ago

lkthomas commented 6 years ago

google_speech -l en abc SSLError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /translate_tts?client=tw-ob&ie=UTF-8&idx=0&total=1&textlen=3&tl=en&q=abc (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),)) Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/usr/local/lib/python3.4/dist-packages/urllib3/connection.py", line 326, in connect sslcontext=context) File "/usr/local/lib/python3.4/dist-packages/urllib3/util/ssl.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket _context=self) File "/usr/lib/python3.4/ssl.py", line 577, in init self.do_handshake() File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.4/dist-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.4/dist-packages/urllib3/util/retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /translate_tts?client=tw-ob&ie=UTF-8&idx=0&total=1&textlen=3&tl=en&q=abc (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/google_speech", line 9, in load_entry_point('google-speech==1.0.16', 'console_scripts', 'google_speech')() File "/usr/local/lib/python3.4/dist-packages/google_speech-1.0.16-py3.4.egg/google_speech/init.py", line 297, in cl_main File "/usr/local/lib/python3.4/dist-packages/google_speech-1.0.16-py3.4.egg/google_speech/init.py", line 251, in main File "/usr/local/lib/python3.4/dist-packages/google_speech-1.0.16-py3.4.egg/google_speech/init.py", line 136, in play File "/usr/local/lib/python3.4/dist-packages/google_speech-1.0.16-py3.4.egg/google_speech/init.py", line 202, in play File "/usr/local/lib/python3.4/dist-packages/google_speech-1.0.16-py3.4.egg/google_speech/init.py", line 244, in download File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 521, in get return self.request('GET', url, kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /translate_tts?client=tw-ob&ie=UTF-8&idx=0&total=1&textlen=3&tl=en&q=abc (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))

desbma commented 6 years ago

Try to update bundled certificates with: pip3 install -U certify