#7342 翻译字幕阶段出错 [M2M100(本地内置)] 系统错误 (None):NoneTraceback (most recent call last):

161.129**8 Posted at: 1 hour ago

翻译字幕阶段出错 [M2M100(本地内置)] 系统错误 (None):None
Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 135, in process_task

File "videotrans\task\translate_srt.py", line 47, in trans

File "videotrans\translator\_runner.py", line 63, in run

File "videotrans\translator\_base.py", line 63, in run

File "videotrans\translator\_m2m100.py", line 75, in _download

File "sentencepiece\__init__.py", line 468, in Init

File "sentencepiece\__init__.py", line 961, in Load

File "sentencepiece\__init__.py", line 316, in LoadFromFile

OSError: Not found: "E:/字幕配音/新建文件夹/新建文件夹/win-pyvideotrans-v4.07/models/m2m100_12b/sentencepiece.model": Illegal byte sequence Error #42
cfg=TaskCfgSTS(uuid='fb2580efc3', name='C:/Users/Administrator/Desktop/日语/双穿:商纣王找我买物资.zh.srt', dirname='C:/Users/Administrator/Desktop/日语', noextname='双穿:商纣王找我买物资.zh', basename='双穿:商纣王找我买物资.zh.srt', ext='srt', target_dir='E:/字幕配音/新建文件夹/新建文件夹/win-pyvideotrans-v4.07/output/translate', cache_folder=None, is_cuda=False, source_language=None, source_language_code='zh', source_sub='C:/Users/Administrator/Desktop/日语/双穿:商纣王找我买物资.zh.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='ja', target_sub='E:/字幕配音/新建文件夹/新建文件夹/win-pyvideotrans-v4.07/output/translate/双穿:商纣王找我买物资.zh.ja.srt', target_wav=None, target_wav_output=None, translate_type=2)


=
system:Windows-10-10.0.19045-SP0
version:v4.07
frozen:True
language:zh
root_dir:E:/字幕配音/新建文件夹/新建文件夹/win-pyvideotrans-v4.07

1 Replies

#1 DeepSeek reply at 1 hour ago

这是因为 M2M100 本地翻译模型文件缺失或损坏:sentencepiece.model 文件未找到(OSError: Not found: .../models/m2m100_12b/sentencepiece.model)。

同时需注意:你的软件目录路径包含中文(E:/字幕配音/新建文件夹/新建文件夹/),且报错为 Illegal byte sequence(非法字节序列),中文路径极易导致此类底层模型加载失败。

解决步骤:

  1. 将软件移动到纯英文、无空格、无特殊符号的浅层目录,例如 D:\pyvideotrans
  2. 手动下载 M2M100 模型并放置到正确位置:

  3. 若仍报错,请删除已下载的 m2m100_12b 文件夹后重新下载解压(部分文件可能下载不完整)。
  4. 如非必须使用本地翻译,也可改用在线 AI 渠道(如 DeepSeek),翻译质量更好且无需下载大模型。

请查阅相关文档:

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