#5670 cfg=TaskCfgSTS(uuid='bc17a169cf', name='E:/黄群/200个绘本/多种语言/《 Rapunzel 》.srt', dirname='E:/黄群/200个绘本/多种语言', noextname='《 R

2409:8a55* Posted at: 3 hours ago

翻译字幕阶段出错 [Google(免费)] 连接被拒绝,无法连接目标服务
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] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):

File "urllib3\connectionpool.py", line 787, in urlopen

File "urllib3\connectionpool.py", line 488, in _make_request

File "urllib3\connectionpool.py", line 464, in _make_request

File "urllib3\connectionpool.py", line 1093, in _validate_conn

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] 由于目标计算机积极拒绝,无法连接。

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='api-edge.cognitive.microsofttranslator.com', port=443): Max retries exceeded with url: /translate?from=&to=de&api-version=3.0&includeSentenceLength=true (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 135, in process_task

File "videotrans\task\translate_srt.py", line 47, in trans

File "videotrans\translator\_runner.py", line 63, in run

File "videotrans\translator\_base.py", line 66, in run

File "videotrans\translator\_base.py", line 96, in _run_text

File "tenacity\__init__.py", line 338, in wrapped_f

File "tenacity\__init__.py", line 477, in call

File "tenacity\__init__.py", line 378, in iter

File "tenacity\__init__.py", line 400, in

File "concurrent\futures\_base.py", line 451, in result

File "concurrent\futures\_base.py", line 403, in __get_result

File "tenacity\__init__.py", line 480, in call

File "videotrans\translator\_microsoft.py", line 36, in _item_task

File "requests\api.py", line 115, in post

File "requests\api.py", line 59, in request

File "requests\sessions.py", line 589, in request

File "requests\sessions.py", line 703, in send

File "requests\adapters.py", line 677, in send

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api-edge.cognitive.microsofttranslator.com', port=443): Max retries exceeded with url: /translate?from=&to=de&api-version=3.0&includeSentenceLength=true (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
cfg=TaskCfgSTS(uuid='bc17a169cf', name='E:/黄群/200个绘本/多种语言/《 Rapunzel 》.srt', dirname='E:/黄群/200个绘本/多种语言', noextname='《 Rapunzel 》', basename='《 Rapunzel 》.srt', ext='srt', target_dir='D:/win-pyvideotrans/output/translate', cache_folder=None, is_cuda=False, source_language=None, source_language_code='en', source_sub='E:/黄群/200个绘本/多种语言/《 Rapunzel 》.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='de', target_sub='D:/win-pyvideotrans/output/translate/《 Rapunzel 》.de.srt', target_wav=None, target_wav_output=None, translate_type=0)


=
system:Windows-10-10.0.19045-SP0
version:v4.04
frozen:True
language:zh
root_dir:D:/win-pyvideotrans

1 Replies

这是由于 Microsoft 翻译服务限流或网络连接被拒绝导致的。错误日志显示连接 api-edge.cognitive.microsofttranslator.com 被拒绝,通常是因为短时间内请求过多触发了微软服务器的限流机制。

解决方法:

  1. 降低翻译请求频率:进入 菜单 -> 工具 -> 高级选项 -> 字幕翻译调整,将 翻译后暂停秒 设置为 5 或更大,将 传统翻译渠道每批字幕行数 降低到 10 以下。
  2. 若使用代理,请确保代理设置正确(格式如 http://127.0.0.1:7890),或清空代理文本框(不使用代理)。
  3. 如果以上方法无效,可临时更换翻译渠道为 Google 翻译(需科学上网)或 DeepSeek/AI 翻译。

请查阅相关文档:

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. Dondate: ko-fi.com/jianchang512

Related resource