#3661 TaskCfgSTS(is_cuda=False, uuid='6da0c83229', cache_folder=None, target_dir='D:/星野源/没翻译', source_language=None, source_la

104.28* Posted at: 1 day ago 👁21

翻译字幕阶段出错 [Gemini AI] 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. To monitor your current usage, head to: https://ai.dev/rate-limit.

  • Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 20, model: gemini-2.5-flash
    Please retry in 6.214873782s.
    Traceback (most recent call last):
    File "videotrans\translator\_gemini.py", line 104, in _item_task
    File "google\genai\models.py", line 5407, in generate_content_stream
    File "google\genai\models.py", line 4101, in _generate_content_stream
    File "google\genai\_api_client.py", line 1405, in request_streamed
    File "google\genai\_api_client.py", line 1224, in _request
    File "tenacity\__init__.py", line 477, in call
    File "tenacity\__init__.py", line 378, in iter
    File "tenacity\__init__.py", line 420, in exc_check
    File "tenacity\__init__.py", line 187, in reraise
    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 "google\genai\_api_client.py", line 1189, in _request_once
    File "google\genai\errors.py", line 121, in raise_for_response
    File "google\genai\errors.py", line 146, in raise_error
    google.genai.errors.ClientError: 429 RESOURCE_EXHAUSTED. {'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. To monitor your current usage, head to: https://ai.dev/rate-limit. * Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 20, model: gemini-2.5-flash Please retry in 6.214873782s.', 'status': 'RESOURCE_EXHAUSTED', 'details': [{'@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.QuotaFailure', 'violations': [{'quotaMetric': 'generativelanguage.googleapis.com/generate_content_free_tier_requests', 'quotaId': 'GenerateRequestsPerDayPerProjectPerModel-FreeTier', 'quotaDimensions': {'location': 'global', 'model': 'gemini-2.5-flash'}, 'quotaValue': '20'}]}, {'@type': 'type.googleapis.com/google.rpc.RetryInfo', 'retryDelay': '6s'}]}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 173, in run
File "videotrans\task\_translate_srt.py", line 44, in trans
File "videotrans\translator\__init__.py", line 990, in run
File "videotrans\translator\_base.py", line 101, in run
File "videotrans\translator\_base.py", line 164, in _run_srt
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\_gemini.py", line 124, in _item_task
videotrans.configure._except.StopRetry: 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. To monitor your current usage, head to: https://ai.dev/rate-limit.

  • Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 20, model: gemini-2.5-flash
    Please retry in 6.214873782s.
    TaskCfgSTS(is_cuda=False, uuid='6da0c83229', cache_folder=None, target_dir='D:/星野源/没翻译', source_language=None, source_language_code='Japanese', source_sub='D:/星野源/没翻译/3月17日.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='Simplified Chinese', target_sub='D:/星野源/没翻译/3月17日.Simplified Chinese.srt', target_wav=None, target_wav_output=None, name='D:/星野源/没翻译/3月17日.srt', noextname='3月17日', basename='3月17日.srt', ext='srt', dirname='D:/星野源/没翻译', shound_del_name=None, translate_type=5)


=
system:Windows-10-10.0.26200-SP0
version:v3.98
frozen:True
language:zh
root_dir:D:/pyvideotransFANYIYONG

1 Replies

这是由于 Gemini AI 免费配额已用尽导致的。Gemini API 免费层对每个模型(如 gemini-2.5-flash)每天有 20 次请求的限制,超出后会出现 429 配额错误。

解决方案:

  1. 等待配额重置:免费配额通常按天重置。根据错误信息,您需要等待约 6 秒后重试,但每日总配额已耗尽,建议等待至次日再尝试。
  2. 升级至付费计划:前往 Google AI Studio (https://aistudio.google.com/) 为您的项目启用付费功能并设置账单,以解除请求限制。
  3. 更换翻译渠道:在 pyVideoTrans 的翻译渠道中,暂时切换到其他可用的渠道,例如:

    • 免费/传统渠道:Google翻译(需配置代理)、微软翻译。
    • 其他AI渠道:DeepSeek、OpenAI ChatGPT(需配置API Key)、智谱AI等。
    • 本地模型:Ollama(需本地部署)。

操作步骤:

  1. 在 pyVideoTrans 主界面,找到“翻译渠道”下拉列表。
  2. 选择除“Gemini AI”以外的其他渠道。
  3. 确保新选择的渠道已正确配置(如需API Key或代理,请在菜单-翻译设置中填写)。
  4. 重新执行翻译任务。

请查阅相关文档:

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.

Related resource