#5821 翻译字幕阶段出错 [Google(免费)] 429 Client Error: Too Many Requests for url: https://api-edge.cognitive.microsofttranslator.com/tr

2409:8a55* Posted at: 7 hours ago

翻译字幕阶段出错 [Google(免费)] 429 Client Error: Too Many Requests for url: https://api-edge.cognitive.microsofttranslator.com/translate?from=&to=fr&api-version=3.0&includeSentenceLength=true
Traceback (most recent call last):

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 421, in exc_check

tenacity.RetryError: RetryError[]

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 72, in run

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

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

File "requests\models.py", line 1026, in raise_for_status

requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://api-edge.cognitive.microsofttranslator.com/translate?from=&to=fr&api-version=3.0&includeSentenceLength=true
cfg=TaskCfgSTS(uuid='a348cf9250', name='E:/新建文件夹/有角色名/029.《 The Devil With The Three Golden Hairs 》.srt', dirname='E:/新建文件夹/有角色名', noextname='029.《 The Devil With The Three Golden Hairs 》', basename='029.《 The Devil With The Three Golden Hairs 》.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:/新建文件夹/有角色名/029.《 The Devil With The Three Golden Hairs 》.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='fr', target_sub='D:/win-pyvideotrans/output/translate/029.《 The Devil With The Three Golden Hairs 》.fr.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

这是由于请求过于频繁触发了微软翻译的限流机制(HTTP 429)。解决方案如下:

  1. 打开主界面 菜单 → 工具/选项 → 高级选项
  2. 在“字幕翻译调整”区域找到 翻译后暂停秒,将其值增大(例如设置为 5~10),以降低请求频率。
  3. 保存设置后重新执行任务。

若问题依然存在,可考虑临时切换其他翻译渠道(如 DeepSeek、百度翻译等)作为备选。

请查阅相关文档:

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 via ko-fi.com

Dondate via PayPal

Related resource