#4486 TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans/tmp/40660/d7988e8c4c', target_dir='C:/Users/Juno/Desktop', remov

212.107* Posted at: 3 hours ago 👁10

配音阶段出错 [gTTS(free)] 网络连接失败
Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

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

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 753, in connect
File "urllib3\connection.py", line 213, in _new_conn
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it

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

urllib3.exceptions.ProxyError: ('Unable to connect to proxy', NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

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', NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')))

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', NewConnectionError(': Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 214, in run
File "videotrans\task\_dubbing.py", line 52, in dubbing
File "videotrans\task\_dubbing.py", line 222, in _tts
File "videotrans\tts\__init__.py", line 347, in run
File "videotrans\tts\_base.py", line 189, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_gtts.py", line 44, 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
TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans/tmp/40660/d7988e8c4c', target_dir='C:/Users/Juno/Desktop', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code='en', source_sub=None, target_sub='C:/Users/Juno/Desktop/Lesson1_Training_Subtitles.srt', source_wav=None, source_wav_output=None, target_wav='C:/Users/Juno/Desktop/Lesson1_Training_Subtitles.mp3', target_wav_output=None, subtitles='', novoice_mp4=None, noextname='Lesson1_Training_Subtitles', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='gtts', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=28, recogn_type=None, model_name=None, voice_autorate=False, video_autorate=False, is_cuda=False, name='C:/Users/Juno/Desktop/Lesson1_Training_Subtitles.srt', basename='Lesson1_Training_Subtitles.srt', ext='srt', dirname='C:/Users/Juno/Desktop', shound_del_name=None, uuid='d7988e8c4c', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False, fix_punc=False, recogn2pass=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/Program Files/win-pyvideotrans

1 Replies

gTTS 网络连接失败,原因是你在软件主界面中填写的网络代理地址无法连接(代理服务未运行或地址错误),导致请求被拒绝。

解决方案:

  1. 如果你的网络环境不需要代理(例如国内使用),请将主界面“网络代理地址”文本框清空
  2. 如果你确定需要使用代理,请检查代理服务是否已启动,并确认地址格式正确(如 http://127.0.0.1:7890),端口号需与代理客户端一致。

注意:gTTS 依赖 translate.google.com,若无需代理仍无法访问,请改用 Edge-TTS(免费,无需代理)等其他配音渠道。

Post Your Reply