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

52.221* Posted at: 16 hours ago 👁15

网络连接失败:Traceback (most recent call last):
File "videotrans\translator\_gemini.py", line 103, in _item_task
File "google\genai\models.py", line 5783, in generate_content_stream
File "google\genai\models.py", line 4666, in _generate_content_stream
File "google\genai\_api_client.py", line 774, in request_streamed
File "google\genai\_api_client.py", line 672, in _request
File "google\genai\errors.py", line 101, in raise_for_response
google.genai.errors.ClientError: 404 NOT_FOUND. {'error': {'code': 404, 'message': 'models/gemini-pro 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 936, in run
File "videotrans\translator\_base.py", line 81, in run
File "videotrans\translator\_base.py", line 99, 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 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 123, in _item_task
videotrans.configure._except.StopRetry: models/gemini-pro 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.84
frozen:True
language:zh
root_dir:F:/

1 Replies

这是 Gemini API 配置错误导致的模型未找到问题。错误显示你使用的模型 gemini-pro 与 API 版本 v1beta 不兼容。

解决方案:

  1. 检查并更新 Gemini API 密钥和模型名称:

    • 在软件主界面,点击"翻译设置"按钮
    • 找到 Gemini 翻译渠道
    • 确保使用的是正确的 API 密钥
    • 将模型名称从 gemini-pro 改为 gemini-1.5-progemini-1.0-pro
  2. 验证网络连接:

    • 确保网络能够正常访问 Google 服务
    • 如果在中国大陆,可能需要配置网络代理
  3. 临时解决方案:

    • 可以暂时切换到其他翻译渠道,如 Google 翻译、DeepSeek 或 OpenAI

如果问题持续,建议查看官方文档获取最新的 Gemini API 配置信息。

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