#2673 TaskCfg(cache_folder=None, target_dir='I:/doublejump_海洋大师班/SRT', remove_noise=False, is_separate=False, detect_language=

104.234* Posted at: 11 hours ago 👁12

翻译字幕阶段出错 [OpenAI ChatGPT] 网络连接失败
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\http_proxy.py", line 317, in handle_request
File "httpcore\_sync\http11.py", line 383, in start_tls
File "httpcore\_backends\sync.py", line 152, in start_tls
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: EOF occurred in violation of protocol (_ssl.c:997)

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

Traceback (most recent call last):
File "openai\_base_client.py", line 982, in request
File "httpx\_client.py", line 914, in send
File "httpx\_client.py", line 942, in _send_handling_auth
File "httpx\_client.py", line 979, in _send_handling_redirects
File "httpx\_client.py", line 1014, in _send_single_request
File "httpx\_transports\default.py", line 249, in handle_request
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ConnectError: EOF occurred in violation of protocol (_ssl.c:997)

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

Traceback (most recent call last):
File "videotrans\task\job.py", line 184, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 918, in run
File "videotrans\translator\_base.py", line 81, in run
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 1014, in request
openai.APIConnectionError: Connection error.

TaskCfg(cache_folder=None, target_dir='I:/doublejump_海洋大师班/SRT', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code='English', target_language_code='Simplified Chinese', source_sub='I:/doublejump_海洋大师班/SRT/03 - Clean up the System.srt', target_sub='I:/doublejump_海洋大师班/SRT/03 - Clean up the System.Simplified Chinese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='03 - Clean up the System', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=3, tts_type=None, recogn_type=None, model_name=None, split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='I:/doublejump_海洋大师班/SRT/03 - Clean up the System.srt', basename='03 - Clean up the System.srt', ext='srt', dirname='I:/doublejump_海洋大师班/SRT', shound_del_name=None, uuid='9aa8975e08', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.19045-SP0
version:v3.92
frozen:True
language:zh
root_dir:G:/win-pyvideotrans-3.89

1 Replies

此错误表明在翻译阶段,软件无法连接到 OpenAI 的服务器。根本原因是网络连接问题,通常与代理设置或网络环境有关。

请按以下步骤排查:

  1. 检查代理设置

    • 在软件主界面第5行,找到“网络代理”输入框。
    • 如果您使用代理(例如 Clash、V2RayN),请在此处填写正确的代理地址和端口,格式为 http://127.0.0.1:端口号socks5://127.0.0.1:端口号
    • 如果您不使用代理,请确保此框为空。
  2. 测试网络连通性

    • 打开浏览器,尝试访问 https://api.openai.com,看是否能正常打开(可能显示“未授权”等提示,这表示网络是通的)。
    • 如果无法访问,说明您的网络环境无法直接连接 OpenAI。您必须配置正确的代理,或考虑更换其他无需代理的翻译渠道(如 DeepSeek、Gemini 等)。
  3. 更换翻译渠道(临时解决方案)

    • 如果网络问题暂时无法解决,可以切换到其他可用的翻译渠道。
    • 在“翻译设置”中,选择如“DeepSeek”、“Google翻译(需代理)”、“微软翻译”等其他渠道,并确保已正确配置相应的 API Key(如果需要)。
  4. 检查防火墙/安全软件

    • 暂时关闭 Windows 防火墙或第三方安全软件,测试是否被拦截。

如果以上步骤均无效,请提供 G:/win-pyvideotrans-3.89/logs/ 目录下最新的日志文件,以便进一步分析具体的网络错误。

请查看更多参考文档:

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