#633 Error in subtitle translation:Traceback (most recent call last): File

*87.246* Posted at: 14 hours ago 👁12

Error in subtitle translation:Traceback (most recent call last): File "videotrans\translator\_base.py", line 78, in run File "videotrans\translator\_base.py", line 94, 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 "videotrans\configure\_except.py", line 71, in _raise RuntimeError: Request triggered 429, please increase the pause time: Error code: 429 - [{'error': {'code': 429, 'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.', 'status': 'RESOURCE_EXHAUSTED', 'details': [{'@type': 'type.googleapis.com/google.rpc.QuotaFailure', 'violations': [{'quotaMetric': 'generativelanguage.googleapis.com/generate_content_free_tier_requests', 'quotaId': 'GenerateRequestsPerDayPerProjectPerModel-FreeTier', 'quotaDimensions': {'model': 'gemini-2.5-pro', 'location': 'global'}, 'quotaValue': '50'}]}, {'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Learn more about Gemini API quotas', 'url': 'https://ai.google.dev/gemini-api/docs/rate-limits'}]}, {'@type': 'type.googleapis.com/google.rpc.RetryInfo', 'retryDelay': '31s'}]}}] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "videotrans\task\job.py", line 105, in run File "videotrans\task\trans_create.py", line 432, in trans File "videotrans\translator\__init__.py", line 809, in run File "videotrans\translator\_base.py", line 80, in run videotrans.configure._except.TranslateSrtError: Request triggered 429, please increase the pause time: Error code: 429 - [{'error': {'code': 429, 'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits.', 'status': 'RESOURCE_EXHAUSTED', 'details': [{'@type': 'type.googleapis.com/google.rpc.QuotaFailure', 'violations': [{'quotaMetric': 'generativelanguage.googleapis.com/generate_content_free_tier_requests', 'quotaId': 'GenerateRequestsPerDayPerProjectPerModel-FreeTier', 'quotaDimensions': {'model': 'gemini-2.5-pro', 'location': 'global'}, 'quotaValue': '50'}]}, {'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Learn more about Gemini API quotas', 'url': 'https://ai.google.dev/gemini-api/docs/rate-limits'}]}, {'@type': 'type.googleapis.com/google.rpc.RetryInfo', 'retryDelay': '31s'}]}}]:Gemini ===== Windows-10-10.0.19045-SP0 version:v3.78 frozen:True language:zh

1 Replies

本条内容由 DeepSeek 回复
您遇到的错误是由于使用的 Google Gemini API 免费额度已耗尽,而非 pyVideoTrans 软件本身的问题。请检查您的 Gemini API 配额或更换为其他翻译引擎。

问题分析:

从错误日志可以清晰地看到,问题出在字幕翻译环节。pyVideoTrans 软件在调用 Google 的 Gemini API(具体是 gemini-2.5-pro 模型)进行翻译时,收到了错误代码 429。该错误信息明确指出:“您已超出当前配额,请检查您的套餐和账单详情”。

具体来说,您使用的免费层级(Free Tier)配额为每天每个项目每个模型 50 次请求("quotaValue": "50"),而这个配额已经被用完了。

解决方案:

这个问题与 pyVideoTrans 软件的功能无关,而是您所使用的翻译 API 服务的限制。请尝试以下任一方案:

1. 检查并等待配额重置(推荐先尝试): Google Gemini API 的免费配额通常是按天重置的。您可以等待24小时(从您第一次使用算起)后再次尝试翻译。

2. 更换翻译引擎(最直接有效的办法): 在 pyVideoTrans 的翻译设置中,将翻译引擎从 “Gemini” 切换到其他可用的选项,例如:

  • Google (免费,通常有更宽松的限额)
  • Azure (需要自己的API密钥)
  • OpenAI (需要自己的API密钥)
  • DeepSeek (免费,可能有额度限制)
  • DeepL (需要自己的API密钥)

操作步骤:

1. 打开 pyVideoTrans 软件。

2. 点击界面上的“设置”按钮。

3. 在“翻译”选项卡下,找到“翻译引擎”下拉菜单。

4. 选择一个替代的引擎(如“Google”),然后点击“确定”保存设置。

5. 重新开始您的视频翻译任务。

通过更换引擎,您可以立即绕过 Gemini API 的配额限制,继续使用 pyVideoTrans 进行翻译。

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