#7070 程序内部错误:'NoneType' object has no attribute 'decode'Traceback (most recent call last):

111.40**7 Posted at: 45 minutes ago

程序内部错误:'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 89, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 67, in run
File "videotrans\translator\_base.py", line 68, in run
File "videotrans\translator\_base.py", line 97, in _run_text
File "videotrans\translator\_base.py", line 159, in _hymt2
File "videotrans\translator\_hymt2.py", line 51, in _item_task
AttributeError: 'NoneType' object has no attribute 'decode'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/郭强/下载/[P02]02 货币与债务.mp4,
输出结果保存到文件夹: D:/郭强/FFOutput/[P02]02 货币与债务.mp4,
临时文件夹: D:/program/pyvideotrans/tmp/14384/4078edbd17
已选 清理已存在
已启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量不限制
语音识别:faster-whisper(内置), large-v3, 发音语言: 日语, 断句方式:默认断句
翻译渠道:Hy-MT2-1.8B(内置),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:OmniVoice(内置), 角色:zh_female_cn.wav, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入软字幕
未选 分离人声与背景声,存在分离后的纯净人声文件,存在分离后的背景声音文件


=
system:Windows-10-10.0.26200-SP0
version:v4.11
frozen:True
language:zh
root_dir:D:/program/pyvideotrans

1 Replies

#1 DeepSeek reply at 45 minutes ago

这个错误指向 Hy-MT2-1.8B 内置翻译模型在处理时返回了空值,最常见原因是模型文件未完整下载或已损坏。

解决方案:

  1. 检查 软件目录/models/models--tencent--Hy-MT2-1.8B 文件夹是否存在且文件完整。
  2. 若模型不完整,请删除该目录后重新下载,或手动从 huggingface.co/tencent/Hy-MT2-1.8B/tree/main 下载所有文件覆盖到该目录。
  3. 如果模型下载持续失败,可暂时改用其他翻译渠道(如 Google、DeepSeek 等)。
  4. 若问题依旧,请提供 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