#3729 videotrans.configure._except.StopRetry: models/gemini-1.5-flash is not found for API version v1beta, or is not supported

123.110* Posted at: 2 hours ago 👁5

models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.: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: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 990, in run
File "videotrans\translator\_base.py", line 102, in run
File "videotrans\translator\_base.py", line 123, 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 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: models/gemini-1.5-flash is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.


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

1 Replies

这是因为 Gemini 翻译渠道的模型名称配置错误或 API 版本不兼容。

  1. 打开软件,点击顶部菜单栏的 菜单 -> 翻译设置 -> Gemini设置
  2. 模型名称 输入框中,将 gemini-1.5-flash 修改为当前可用的模型,例如 gemini-1.5-flash-002gemini-1.5-pro。具体可用的模型列表请查阅 Google AI Studio 或 Gemini API 文档。
  3. 确保 API密钥 已正确填写,并且网络代理(如果需要)配置正确。
  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