#4968 openai.OpenAIError: Missing credentials. Please pass an `api_key`, `workload_identity`, `admin_api_key`, or set the `OPE

191.6* Posted at: 1 day ago

:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 69, in run
File "videotrans\translator\_base.py", line 98, 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 421, in exc_check
tenacity.RetryError: RetryError[]

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 858, in run
File "videotrans\translator\_base.py", line 75, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 74, in _item_task
File "openai\_client.py", line 194, in init
openai.OpenAIError: Missing credentials. Please pass an api_key, workload_identity, admin_api_key, or set the OPENAI_API_KEY or OPENAI_ADMIN_KEY environment variable.


=
system:Windows-10-10.0.22631-SP0
version:v4.01
frozen:True
language:en
root_dir:E:/win-pyvideotrans-v4.01-0602

1 Replies

The error indicates a missing API key for the AI translation channel you are using (e.g., OpenAI, DeepSeek, Gemini). The traceback shows Missing credentials – no API key was provided.

Solution:

  1. Open the software and go to the top menu: Translate Settings (e.g., "ChatGPT" or "DeepSeek" or "Compatible AI/Local Model").
  2. In the corresponding settings panel, fill in your API key and Base URL (if needed).
  3. Save the settings and retry the translation task.

If you are unsure which channel you selected, check the main interface under "Translation channel" and confirm that the correct one is chosen, then verify its API key is configured in the menu.

Please refer to the relevant documentation:

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. Dondate: ko-fi.com/jianchang512

Related resource