#2182 openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}

31.26* Posted at: 22 hours ago 👁16

Requested resource not found, check model name or API address Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 918, in run
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, 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\_chatgpt.py", line 134, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1156, in create
File "openai\_base_client.py", line 1259, in post
File "openai\_base_client.py", line 1047, in request
openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}


=
system:Windows-10-10.0.26200-SP0
version:v3.91
frozen:True
language:en
root_dir:C:/Users/Utente/Documents/pyvideotrans/win-pyvideotrans-v3.91

1 Replies

The error "Resource not found" (404) indicates that the OpenAI API endpoint you are trying to access is incorrect or the model name is invalid. This is a configuration issue with your OpenAI API settings.

Follow these steps to fix it:

  1. Check your OpenAI API Key and Base URL:

    • Go to the main interface.
    • Click on Settings (the gear icon) or go to the Translation section and click "Set Translation API".
    • Find the configuration for OpenAI (ChatGPT).
    • API Key: Ensure your key is correct and has not expired. You can test it on the OpenAI platform.
    • Base URL (API Address): This is the most likely cause.

      • If you are using the official OpenAI API, the URL should be: https://api.openai.com/v1
      • If you are using a proxy service (like one-click API, Cloudflare Workers proxy, or a local LLM gateway like Open WebUI, LiteLLM, etc.), you must enter the complete and correct proxy address provided by that service (e.g., https://your-proxy.example.com/v1).
  2. Check the Model Name:

    • In the same OpenAI settings, verify the Model field.
    • Ensure you are using a valid, available model name (e.g., gpt-3.5-turbo, gpt-4, gpt-4o). Do not use deprecated model names.
  3. Test the Connection:

    • After correcting the Base URL and Model, use the "Test Network and Key" button in the settings window to verify the connection.
  4. Common Proxy URL Format:

    • If you are using a common one-click proxy, the address often ends with /v1.
    • Important: Do not include /chat/completions in the Base URL. The software adds that path automatically. Your Base URL should look like: https://api.openai.com/v1 or https://your-proxy.com/v1.

If the problem persists after checking these settings, please provide the exact Base URL and Model Name you have configured.

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