RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

gtts.tts.gTTSError: Failed to connect. Probable cause: Host 'https://translate.google.co.uk/' is not reachable

Open Incisivity opened this issue 4 years ago • 2 comments

Traceback (most recent call last): File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 1040, in _validate_conn conn.connect() File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 412, in connect context.load_default_certs() File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 574, in load_default_certs self._load_windows_store_certs(storename, purpose) File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 566, in _load_windows_store_certs self.load_verify_locations(cadata=certs) ssl.SSLError: nested asn1 error (_ssl.c:4067)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 440, in send resp = conn.urlopen( File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen retries = retries.increment( File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.google.co.uk', port=443): Max retries exceeded with url: //TranslateWebserverUi/data/batchexecute (Caused by SSLError(SSLError(58, 'nested asn1 error (_ssl.c:4067)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\gtts\tts.py", line 265, in stream r = s.send( File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='translate.google.co.uk', port=443): Max retries exceeded with url: /_/TranslateWebserverUi/data/batchexecute (Caused by SSLError(SSLError(58, 'nested asn1 error (_ssl.c:4067)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 18, in length, number_of_comments = save_text_to_mp3(reddit_object) File "C:\Users\hp\OneDrive\Desktop\RedditVideoMakerBot-master\video_creation\voices.py", line 21, in save_text_to_mp3 tts.save(f"assets/mp3/title.mp3") File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\gtts\tts.py", line 329, in save self.write_to_fp(f) File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\gtts\tts.py", line 310, in write_to_fp for idx, decoded in enumerate(self.stream()): File "C:\Users\hp\AppData\Local\Programs\Python\Python38\lib\site-packages\gtts\tts.py", line 281, in stream raise gTTSError(tts=self) gtts.tts.gTTSError: Failed to connect. Probable cause: Host 'https://translate.google.co.uk/' is not reachable

Incisivity avatar Jun 01 '22 18:06 Incisivity

do you have a stable internet connection on that computer?

JasonLovesDoggo avatar Jun 01 '22 18:06 JasonLovesDoggo

Hi @Incisivity ,

I hope you were able to resolve your issue as there has not been activity in this Issue, I will be closing this for the time being. Feel free to re-open the issue if it has not been solved!!

Happy Coding!

FreebieII avatar Jun 06 '22 18:06 FreebieII