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

2409:**:94e Posted at: 3 hours 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 48, in trans

File "videotrans\translator\__init__.py", line 860, in run

File "videotrans\translator\_base.py", line 64, 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: "D:/翻译/models/m2m100_12b/sentencepiece.model": No such file or directory Error #2
TaskCfgSTS(uuid='f544b2b59b', name='C:/Users/mh/Desktop/Timeline 1-ocr.srt', dirname='C:/Users/mh/Desktop', noextname='Timeline 1-ocr', basename='Timeline 1-ocr.srt', ext='srt', target_dir='C:/Users/mh/Desktop', cache_folder=None, is_cuda=False, source_language=None, source_language_code='en', source_sub='C:/Users/mh/Desktop/Timeline 1-ocr.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='zh', target_sub='C:/Users/mh/Desktop/Timeline 1-ocr.zh.srt', target_wav=None, target_wav_output=None, translate_type=2)


=
system:Windows-10-10.0.26200-SP0
version:v4.02
frozen:True
language:zh
root_dir:D:/翻译

1 Replies

这是 M2M100 本地翻译模型文件不完整或未正确解压导致的。报错明确指出缺少 sentencepiece.model 文件,说明模型没有下载完整,或解压后的目录结构不正确。

解决方法

  1. 打开软件目录 D:/翻译/models/m2m100_12b/,检查该文件夹内是否有 sentencepiece.model 等模型文件。
  2. 如果文件夹不存在或文件不全:

    • 先关闭软件,删除 D:/翻译/models/m2m100_12b 整个文件夹。
    • 重新打开软件,再次执行翻译,让软件自动重新下载模型。
  3. 如果自动下载仍失败或速度过慢,可手动下载模型压缩包:

    • 下载地址:https://modelscope.cn/models/himyworld/videotrans/resolve/master/m2m100_12b_model.zip
    • 将压缩包内的 m2m100_12b 文件夹解压后,完整复制到 D:/翻译/models/ 目录下。
  4. 建议尽量将软件安装到纯英文路径(例如 D:/pyVideoTrans),避免中文路径对部分底层库造成影响。
  5. 如果以上操作后仍报错,请提供软件安装目录下 logs/ 文件夹中最新的日志文件内容,并说明软件左上角显示的版本号。

请查阅相关文档:

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