#8687 API URL is error: Traceback (most recent call last):

176.4**9 Posted at: 39 minutes ago

API URL is error:
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 90, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 82, in run
File "videotrans\translator\_base.py", line 165, 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 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 57, in _item_task
videotrans.configure.excepts.StopTask: API URL is error:

trk=[TransCreate]: uuid='75feb5ab28', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Admin/Videos/4K Video Downloader+/Warum kam es zum MAGA-Midterm-Debakel Folge 410.mp4,
输出结果保存到文件夹: C:/Users/Admin/Videos/Warum kam es zum MAGA-Midterm-Debakel Folge 410-mp4,
临时文件夹: D:/win-pyvideotrans-v4.17-1028/tmp/45796/75feb5ab28
已选 清理已存在
已启用CUDA加速
已选 识别说话人,最大说话人数量2
STT Service:openai-whisper(Built-in), large-v3-turbo, 发音语言: English, , 数据类型:default
TranslateSrt:OpenAI ChatGPT,原始语言:English,目标语言:German, 已选 SendSRT, settings.get('trans_thread')=5, settings.get('aitrans_thread')=40
TTS Service:Edge-TTS (Free), 角色:Conrad(Male/DE), 配音语言:German
已选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: Hard Subtitles , precent=15, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=True, do_diarize=True
video_duration_ms=4427162


=
system:Windows-10-10.0.26200-SP0
version:v4.17
frozen:True
language:en_US
root_dir:D:/win-pyvideotrans-v4.17-1028

1 Replies

#1 DeepSeek reply at 38 minutes ago

The translation channel selected is OpenAI ChatGPT, but its API URL is empty, so _openaicompat.py throws StopTask: API URL is error: before it sends any request. The log shows nothing after API URL is error: , which means the URL field was blank. Note that v4.16 standardized the parameter names in params.json, so the API URL and Secret Key saved for some channels must be re-entered after the upgrade, which is likely what happened to you.

Fix it as follows:

  1. Open Menu → Translation Settings → OpenAI ChatGPT.
  2. Fill in API URL: use https://api.openai.com/v1 for the official service; for a relay or compatible service, enter its base URL (it must start with http:// or https://). For a locally deployed service, use 127.0.0.1, never 0.0.0.0 (the software rejects it).
  3. Fill in the Secret Key (sk-...), save, and restart the software before retrying translation.
  4. In mainland China, enter the proxy in the proxy box on the main window, in the format http://127.0.0.1:7890; if the proxy is invalid, leave it empty.
  5. If the URL and key are both already filled in and the same error still appears, download the latest patch package again and overwrite it (replacing all files, including _internal and videotrans); or back up and delete videotrans/params.json and re-enter the configuration so the settings take effect.
  6. You can also switch the translation channel to DeepSeek (Menu → Translation Settings → DeepSeek), fill in the key, and select Deepseek in the translation channel drop-down; this is more stable in the domestic network environment.

Retry with Clear Output checked or unchecked according to your need; your parameter choices (SendSRT, audio speedup + video slowdown, SecondarySTT) are fine and do not affect this error.

Please refer to the related documentation:

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