#1280 gtts.tts.gTTSError: Failed to connect. Probable cause: Unknown

60.49* Posted at: 7 hours ago 👁9

Network connection failed:
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 773, in urlopen
File "urllib3\connectionpool.py", line 1042, in _prepare_proxy
File "urllib3\connection.py", line 770, in connect
File "urllib3\connection.py", line 269, in _tunnel
OSError: Tunnel connection failed: 407 Proxy Authentication Required

The above exception was the direct cause of the following exception:

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 519, in increment
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /_/TranslateWebserverUi/data/batchexecute (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "gtts\tts.py", line 268, in stream
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 671, in send
requests.exceptions.ProxyError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /_/TranslateWebserverUi/data/batchexecute (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 297, in run
File "videotrans\tts\_base.py", line 177, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_gtts.py", line 45, in _run
File "gtts\tts.py", line 335, in save
File "gtts\tts.py", line 316, in write_to_fp
File "gtts\tts.py", line 287, in stream
gtts.tts.gTTSError: Failed to connect. Probable cause: Unknown


=
system:Windows-10-10.0.26200-SP0
version:v3.83
frozen:True
language:en
root_dir:C:/Users/Jenson/Downloads/Compressed/Video Trans 3.83

1 Replies

The error indicates a proxy authentication issue when connecting to Google Translate. This occurs because your system is behind a proxy that requires authentication, but pyVideoTrans cannot automatically use your system's proxy settings.

Solution:

  1. Disable system proxy temporarily while using pyVideoTrans, or
  2. Configure proxy in pyVideoTrans settings:

    • Go to Translation Settings in the menu
    • Set up your proxy with authentication in the network settings
    • Make sure to include your proxy username and password if required

Alternative workaround:

  • Switch to a different translation service that doesn't require proxy authentication, such as:

    • Microsoft Translator
    • DeepL
    • OpenAI/Gemini/DeepSeek (if you have API keys)
    • Local translation models

Since you're using Google Translate (gTTS) which is having proxy connection issues, changing to another translation provider should resolve this immediately without needing to configure proxy settings.

The error occurs during the TTS (text-to-speech) phase when trying to connect to Google's servers. Using an alternative translation service will bypass this proxy authentication requirement entirely.

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions