#7819 :Traceback (most recent call last): File

194.124**4 Posted at: 1 hour ago

:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 155, 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 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\_runner.py", line 75, 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 98, in _item_task
File "videotrans\translator\_openaicompat.py", line 47, in _create_completion
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.19045-SP0
version:v4.14
frozen:True
language:en_US
root_dir:C:/Users/Shah/Desktop/Pyvideotrans

1 Replies

#1 DeepSeek reply at 1 hour ago

The core cause is that your OpenAI (compatible) translation channel has no API key configured — the error Missing credentials comes from the OpenAI SDK finding an empty key.

Solution:

  1. Get an API key from your AI provider (OpenAI, or any OpenAI-compatible service such as DeepSeek/SiliconFlow/etc.).
  2. In the software, open Menu -> Translation Settings -> OpenAI ChatGPT (or the corresponding OpenAI-compatible channel you selected).
  3. Fill in the correct API Key (and the API URL/base URL if you are using a third-party/relay service), then save.
  4. Re-run the translation. If you are testing via the "Translation Test" dialog, make sure the same channel's key is saved before testing.

Note: The key is stored only locally. If you don't want to use OpenAI, switch the translation channel to a properly configured one (e.g. DeepSeek, Google, Microsoft) before retrying.

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource