#8531 Subprocess Error: module 'decoders' has no attribute 'DecodeStream'Traceback (most recent call last):

13.231**8 Posted at: 1 hour ago

Subprocess Error: module 'decoders' has no attribute 'DecodeStream'
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whisper.py", line 39, in _exec
File "videotrans\recognition\_whisper.py", line 136, in _faster
File "videotrans\configure\base.py", line 277, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: module 'decoders' has no attribute 'DecodeStream'

trk=[TransCreate]: uuid='ee9c2c75d6', proxy_str='http://127.0.0.1:7890', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/admin/Desktop/6寸电链锯链轮8寸锂电锯高速锯链轮9齿链轮8_10内孔电链锯05191_-_阿里巴巴/6寸电链锯链轮8寸锂电锯高速锯链轮9齿链轮8_10内孔电链锯05191.mp4,
输出结果保存到文件夹: C:/Users/admin/Desktop/6寸电链锯链轮8寸锂电锯高速锯链轮9齿链轮8_10内孔电链锯05191_-_阿里巴巴/_video_out/6寸电链锯链轮8寸锂电锯高速锯链轮9齿链轮8_10内孔电链锯05191-mp4,
临时文件夹: E:/pyVideoTrans/tmp/12876/ee9c2c75d6
未选 清理已存在
未启用CUDA加速
语音识别↓:faster-whisper(Built-in), large-v3-turbo, 发音语言: zh-cn, , 数据类型:default
翻译渠道↓:Google(免费),原始语言:zh-cn,目标语言:ru, 未选 发送完整字幕, settings.get('trans_thread')=20, settings.get('aitrans_thread')=50
配音渠道↓:Edge-TTS(免费), 角色:Dmitry(Male/RU), 配音语言:ru, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 已选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 不添加字幕
代理地址: http://127.0.0.1:7890, precent=4, 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=False, do_diarize=True
video_duration_ms=15200


=
system:Windows-10-10.0.19045-SP0
version:v4.17
frozen:True
language:zh
root_dir:E:/pyVideoTrans

1 Replies

#1 DeepSeek reply at 1 hour ago

出现 module 'decoders' has no attribute 'DecodeStream',通常不是视频本身的问题,而是软件目录中的 Python 依赖版本不匹配或被旧文件/残留缓存覆盖(这类 “module xxx has no attribute yyy” 报错,绝大多数是版本不一致导致的)。

请按以下顺序排查处理:

  1. 检查是否只覆盖了 sp.exe
    若你之前是「旧版 + 补丁包」的方式升级,只覆盖 sp.exe 是不够的。补丁包内的 sp.exe、_internal 文件夹、videotrans 文件夹必须全部覆盖到旧版本目录中,否则依赖版本会对不上。
  2. 清理旧缓存
    进入软件根目录下的 _internal 文件夹,搜索所有名为 __pycache__ 的文件/文件夹并全部删除,然后重新覆盖一次补丁包(或完整包)。
  3. 确认根目录没有同名干扰文件
    检查 E:/pyVideoTrans 根目录下是否存在 decoders.py 这类多余文件,如有请删除(它会遮蔽真正的 decoders 包)。
  4. 重新下载完整包到全新目录
    若以上都无效,最稳妥的做法是:从官网重新下载最新 完整包(2.7GB 左右),解压到一个全新目录(如 E:/pyVideoTrans2),把原来的 videotrans 文件夹中的 params.json、cfg.json 复制过去,然后启动测试。可排除旧目录遗留脏文件。
⚠️ 附带提醒:你当前视频路径为 C:/Users/admin/Desktop/6寸电链锯链轮8寸...阿里巴巴/,中文长路径+长文件名是软件最常见的报错诱因之一,容易在后续 FFmpeg 合成阶段出现「路径过长」「ffprobe exec error」等问题。建议把视频改名成简短的英文/数字名(如 video1.mp4),并放到浅层目录(如 D:/videos/)再试。

如果按上述处理后仍报同样错误,请提供软件根目录 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