#1327 videotrans.configure._except.StopRetry: models/gemini-2.5-flash-preview-04-17 is not found for API version v1beta, or i

2402:800* Posted at: 14 hours ago 👁10

Error during subtitle translation:[Gemini AI] Network connection failed:
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-2.5-flash-preview-04-17 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\task\job.py", line 146, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 920, in run
File "videotrans\translator\_base.py", line 80, in run
File "videotrans\translator\_base.py", line 143, 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 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-2.5-flash-preview-04-17 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.26100-SP0
version:v3.82
frozen:True
language:en
root_dir:D:/youtober/pyvideotiny

1 Replies

The error indicates that the Gemini AI model you're trying to use (gemini-2.5-flash-preview-04-17) is not available or not supported for the generateContent method in the API version you're using (v1beta).

This is likely because:

  1. The model name has changed or been deprecated
  2. Your API key doesn't have access to this specific model
  3. The API version needs to be updated

Solutions:

  1. Check available models:

  2. Update model selection:

    • In pyVideoTrans, go to Translation Settings
    • For Gemini AI, try using a stable model like gemini-1.5-flash or gemini-1.5-pro instead of the preview model
  3. Verify API configuration:

    • Ensure your Gemini API key is valid and has proper permissions
    • Make sure you're using the correct API endpoint
  4. Alternative translation service:

    • Temporarily switch to another translation provider (Google, Microsoft, DeepSeek, etc.) while you resolve the Gemini API issue

The error specifically mentions to "Call ListModels to see the list of available models and their supported methods" - this suggests the model you selected may no longer be available in the current API version.

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