#638 openai.RateLimitError: Error code: 429 - [{'error': {'code': 429, 'message': 'You exceeded your current quota, please ch

*90.98* Posted at: 12 hours ago 👁14

翻译字幕阶段出错:请求频繁触发429,请调大暂停时间: 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. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 200 Please retry in 18.614562205s.', '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': {'location': 'global', 'model': 'gemini-2.0-flash'}, 'quotaValue': '200'}]}, {'@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': '18s'}]}}][OpenAI ChatGPT]:

Traceback (most recent call last):

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

File "videotrans\task\_translate_srt.py", line 48, in trans

File "videotrans\translator\__init__.py", line 844, in run

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

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

File "videotrans\translator\_chatgpt.py", line 169, in _item_task

File "openai\_utils\_utils.py", line 287, in wrapper

File "openai\resources\chat\completions\completions.py", line 1150, in create

File "openai\_base_client.py", line 1259, in post

File "openai\_base_client.py", line 1047, in request

openai.RateLimitError: 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. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 200 Please retry in 18.614562205s.', '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': {'location': 'global', 'model': 'gemini-2.0-flash'}, 'quotaValue': '200'}]}, {'@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': '18s'}]}}]

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
问题核心原因是您使用的翻译服务(Google Gemini API)的免费额度已用完,导致翻译请求被拒绝。解决办法是更换其他翻译服务(如OpenAI GPT或Azure等)或等待额度重置。

详细分析:

从错误日志可以清晰地看到,问题出在 翻译服务 上,而不是 pyVideoTrans 软件本身。具体来说:

1. 错误代码 429: 这是一个标准的 HTTP 状态码,表示“请求过多”。

2. 错误信息: 错误信息明确指出:“You exceeded your current quota, please check your plan and billing details.”(您已超出当前配额,请检查您的套餐和账单详情)。

3. 关键细节: 错误信息进一步说明,您使用的是 Google Gemini API 的免费层级,其每日请求限额为 200次。您今天的 200 次免费额度已经用完,因此 API 拒绝了新的翻译请求,并提示您需要等待大约 18 秒后重试(但实际上需要等待到第二天额度重置)。

为什么会出现这个问题?

  • pyVideoTrans 本身只是一个调用各种翻译 API(如 Google Gemini, OpenAI GPT, Azure, DeepSeek 等)的工具。
  • 您可能在软件设置中选择了 “Google Gemini” 作为翻译引擎。
  • 每个 API 服务商都会对免费使用设置每日或每月的调用次数限制。您已经达到了 Google Gemini 免费版的每日 200 次请求上限。

解决方案:

您有以下几种选择:

1. (推荐)更换翻译引擎:这是最快、最直接的解决办法。

  • 打开 pyVideoTrans 软件。
  • 进入 设置 界面。
  • 翻译服务 选项中,选择一个您拥有有效 API 密钥的服务,例如:
  • OpenAI ChatGPT: 如果您有 OpenAI 的 API 密钥。
  • Microsoft Azure: 如果您有 Azure 的翻译服务密钥。
  • DeepSeekMoonshot 等国内服务。
  • 填写对应服务的 API 密钥,然后重新尝试翻译任务。

2. 等待配额重置:如果您坚持使用免费的 Google Gemini 服务,那么您需要等待到 UTC 时间第二天零点(对应北京时间第二天早上8点)之后,免费额度会自动重置为 200 次,届时即可继续使用。

3. 升级 Google Gemini API 套餐:如果您觉得 Google Gemini 的翻译质量很好,可以考虑为其绑定付费账户,这样就不会有每日 200 次的限制。

总结:

这个问题是典型的第三方 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