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

2409:8a55* Posted at: 4 days ago

翻译字幕阶段出错 [微软(免费)] 429 Client Error: Too Many Requests for
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
cfg=TaskCfgSTS(uuid='22e7882b3c', name='E:/字幕源文件/有角色名/001.《 The Frog Prince 》_batch.srt', dirname='E:/字幕源文件/有角色名', noextname='001.《 The Frog Prince 》_batch', basename='001.《 The Frog Prince 》_batch.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:/字幕源文件/有角色名/001.《 The Frog Prince 》_batch.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='ko', target_sub='D:/win-pyvideotrans/output/translate/001.《 The Frog Prince 》_batch.ko.srt', target_wav=None, target_wav_output=None, translate_type=1)


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

1 Replies

这是由于微软免费翻译接口对短时间内的请求进行了限流,触发了 429 错误。

解决方案

  1. 打开主界面上方菜单 工具 → 高级选项
  2. 进入 "字幕翻译调整" 区域。
  3. "传统翻译渠道每批字幕行数" 降低(例如设为 5 或 10)。
  4. "翻译后暂停秒" 增大(例如设为 3 或 5 秒),以降低请求频率。
  5. 保存后,删除 tmp/translate_cache/ 下的缓存文件(或勾选主界面"清理已生成"),重新执行翻译。

如果仍频繁出错,建议改用其他翻译渠道(如 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