#5572 保存字幕前格式化srt失败:file='D:/GHIN/A-PLAN/F/MP1-mp4/zh-cn.srt'Traceback (most recent call last): File "videotrans\task\_base.p

14.19* Posted at: 1 hour ago

保存字幕前格式化srt失败:file='D:/GHIN/A-PLAN/F/MP1-mp4/zh-cn.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:/GHIN/A-PLAN/F/MP1-mp4/zh-cn.srt'

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

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 46, in run
File "videotrans\task\trans_create.py", line 341, in recogn
File "videotrans\task\_base.py", line 86, in _save_srt_target
videotrans.configure.excepts.VideoTransError: 保存字幕前格式化srt失败:file='D:/GHIN/A-PLAN/F/MP1-mp4/zh-cn.srt'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: D:/GHIN/A-PLAN/MP1.mp4,
输出结果保存到文件夹: D:/GHIN/A-PLAN/F/MP1-mp4,
临时文件夹: D:/AI/tmp/8328/16842c4adf
已选 清理已存在
未选 启用CUDA加速
未选 降噪
语音识别:openai-whisper(本地内置), model_name: tiny, 发音语言: 简体中文, 断句方式:默认断句
翻译渠道:腾讯翻译,原始语言:简体中文,目标语言:英语, 未选 发送完整字幕
配音渠道:Qwen3-TTS(本地内置), 角色:clone, 配音语言:英语, 未选 二次语音识别
音量:+0%, 语速:+0%, 未选 音频加速, 未选 视频慢速
未选 移除字幕间空隙, 未选 强制对齐字幕和声音
字幕: 嵌入硬字幕
已选 仅输出mp4
代理地址:


=
system:Windows-10-10.0.19045-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/AI

1 Replies

错误原因:软件尝试将字幕文件写入输出目录 D:/GHIN/A-PLAN/F/MP1-mp4/ 时,发现该目录或其父目录 D:/GHIN/A-PLAN/F/ 不存在,或没有写入权限。由于您勾选了“清理已生成”,软件会先删除旧的输出目录再重建,如果父目录不存在或权限不足,重建就会失败,导致无法保存字幕文件。

解决步骤:

  1. 确认父目录存在:手动检查 D:/GHIN/A-PLAN/F/ 是否存在,若不存在则手动创建该文件夹。
  2. 更换输出路径:点击主界面“输出到..”按钮,将输出目录改为一个简单的、已存在的路径(例如 D:/output),避免嵌套过深或使用特殊字符。
  3. 关闭杀毒软件:暂时关闭 360、腾讯管家、火绒等防护软件,或将软件安装目录整体添加至白名单。
  4. 尝试不使用“清理已存在”:取消勾选主界面“清理已生成”,重新运行任务,利用已有缓存避免目录重建冲突。

若仍失败,请提供 logs/ 目录下最新的 .log 文件(复制底部约30行内容)以便进一步定位。软件版本号为 v4.03,请注意升级到最新版可能已修复此问题。

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: ko-fi.com/jianchang512

Related resource