#6456 保存字幕前格式化srt失败:file='D:/ike/咖啡心语/8月5日/P2-mp4/en.srt'Traceback (most recent call last):

240e:**:8d4d Posted at: 1 hour ago

保存字幕前格式化srt失败:file='D:/ike/咖啡心语/8月5日/P2-mp4/en.srt'
Traceback (most recent call last):
File "videotrans\task\_base.py", line 82, in _save_srt_target
FileNotFoundError: [Errno 2] No such file or directory: 'D:/ike/咖啡心语/8月5日/P2-mp4/en.srt'

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

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 62, in run
File "videotrans\task\_stage_recogn.py", line 83, in recogn
File "videotrans\task\_base.py", line 86, in _save_srt_target
videotrans.configure.excepts.VideoTransError: 保存字幕前格式化srt失败:file='D:/ike/咖啡心语/8月5日/P2-mp4/en.srt'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: D:/ike/咖啡心语/生肉/P2.mp4,
输出结果保存到文件夹: D:/ike/咖啡心语/8月5日/P2-mp4,
临时文件夹: E:/ike/win-pyvideotrans-v4.08-0802/tmp/9272/bc8928d6c3
已选 清理已存在
未启用CUDA加速
未选 降噪
已选 删除所有标点符号
语音识别:阿里百炼API/Qwen3-ASR, model_name: , 发音语言: 英语, 断句方式:LLM重新断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 未选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕(双) 目标语言在上双字幕
已选 仅输出mp4
代理地址:


=
system:Windows-10-10.0.22621-SP0
version:v4.08
frozen:True
language:zh
root_dir:E:/ike/win-pyvideotrans-v4.08-0802

1 Replies

这是由输出路径包含中文、数字和特殊符号导致的。你自定义的输出目录是 D:/ike/咖啡心语/8月5日/P2-mp4,其中含中文字符(咖啡心语)和中文日期(8月5日),保存字幕时底层文件组件无法正确创建/访问该目录,因此报 FileNotFoundError: ... en.srt

解决步骤:

  1. 将原始视频和输出路径全部改为纯英文、数字、下划线的简单路径,例如 D:/ike/P2.mp4
  2. 在主界面不要点击「输出到..」自定义输出目录,改用默认输出位置(视频同级 _video_out 文件夹);
  3. 将文件名重命名为 P2.mp4 这类简短英文名,避免中文路径;
  4. 若仍失败,请提供 logs/ 目录下最新的日志文件(约30行)。

请查阅相关文档:

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 via ko-fi.com

Dondate via PayPal

Related resource