#7150 翻译字幕阶段出错 [兼容AI/本地模型] Connection error.Traceback (most recent call last):

89.167**5 Posted at: 1 hour ago

翻译字幕阶段出错 [兼容AI/本地模型] Connection error.
Traceback (most recent call last):

File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions

File "httpx\_transports\default.py", line 250, in handle_request

File "httpcore\_sync\connection_pool.py", line 216, in handle_request

File "httpcore\_sync\connection_pool.py", line 196, in handle_request

File "httpcore\_sync\connection.py", line 101, in handle_request

File "httpcore\_sync\http11.py", line 143, in handle_request

File "httpcore\_sync\http11.py", line 93, in handle_request

File "httpcore\_sync\http11.py", line 151, in _send_request_headers

File "contextlib.py", line 153, in exit

File "httpcore\_exceptions.py", line 14, in map_exceptions

httpcore.LocalProtocolError: Illegal header value b'Bearer 1 '

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "openai\_base_client.py", line 1037, in request

......
nt.py", line 1332, in post

File "openai\_base_client.py", line 1072, in request

openai.APIConnectionError: Connection error.
TaskCfgVTT(uuid='24471b2da7', name='E:/迅雷云盘/bit/fanyi/[email protected]4', dirname='E:/迅雷云盘/bit/fanyi', noextname='hhd800.com@MIDA-728', basename='[email protected]4', ext='mp4', target_dir='hhd800.com@MIDA-728-mp4', cache_folder='C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602/tmp/11324/24471b2da7', is_cuda=True, source_language='日语', source_language_code='ja', source_sub='hhd800.com@MIDA-728-mp4/ja.srt', source_wav='C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602/tmp/11324/24471b2da7/ja.wav', source_wav_output='hhd800.com@MIDA-728-mp4/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='hhd800.com@MIDA-728-mp4/zh-cn.srt', target_wav='C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602/tmp/11324/24471b2da7/target.wav', target_wav_output='hhd800.com@MIDA-728-mp4/zh-cn.m4a', translate_type=8, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='ja', recogn_type=1, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='tiqu', subtitles='', targetdir_mp4='hhd800.com@MIDA-728-mp4/[email protected]4', novoice_mp4='C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602/tmp/11324/24471b2da7/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602/tmp/11324/24471b2da7/vocal.wav', clear_cache=False, background_music='', subtitle_type=0, only_out_mp4=False, recogn2pass=False, output_srt=2, copysrt_rawvideo=True, loop_backaudio=0, backaudio_volume=0.8)


=
system:Windows-10-10.0.26200-SP0
version:v4.01
frozen:True
language:zh
root_dir:C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602

1 Replies

#1 DeepSeek reply at 1 hour ago

错误核心原因:Illegal header value b'Bearer 1 ' 表示软件在发送请求时,Authorization头被设置成了 Bearer 1 。这通常是因为你在“兼容AI/本地模型”翻译渠道中填写的API密钥不正确,例如密钥值只有数字“1”,或密钥前后混入了空格、换行等非法字符。

解决方法:

  1. 打开 菜单 -> 翻译设置,找到“兼容AI/本地模型”渠道,检查“API密钥”字段是否填写错误。确认密钥值本身是纯英文数字,前后无空格;如果该本地模型不需要密钥,请将该字段留空。
  2. 检查“API地址”是否填写正确,必须以 http://https:// 开头,且结尾应包含 /v1 或类似路径,不要填写 0.0.0.0 地址,应改为 127.0.0.1
  3. 确认你的本地AI服务(如 Ollama、LocalAI 等)已正常启动,且该地址可访问。
  4. 若以上无误,请重启软件后重试。

另外,你当前版本为 v4.01,建议升级到最新版本 v4.12,该错误可能已在后续版本修复。

如果仍无法解决,请提供 logs/ 目录下最新日志文件末尾约30行内容,以便进一步分析。

请查阅相关文档:

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