#7533 Subprocess Error: cannot import name 'TensorSpec' from 'safetensors._safetensors_rust' (C:\Users\Jonathan\Music\win-pyvi

2800**8ef2 Posted at: 1 hour ago

Subprocess Error: cannot import name 'TensorSpec' from 'safetensors._safetensors_rust' (C:\Users\Jonathan\Music\win-pyvideotrans-v4.08-0802\_internal\safetensors\_safetensors_rust.cp310-win_amd64.pyd)
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 107, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 101, in _tts
File "videotrans\tts\__init__.py", line 118, in run
File "videotrans\tts\_base.py", line 95, in run
File "videotrans\tts\_confuciustts.py", line 39, in _exec
File "videotrans\configure\base.py", line 264, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: cannot import name 'TensorSpec' from 'safetensors._safetensors_rust' (C:\Users\Jonathan\Music\win-pyvideotrans-v4.08-0802\_internal\safetensors\_safetensors_rust.cp310-win_amd64.pyd)

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Jonathan/Music/acor3.mp4,
输出结果保存到文件夹: C:/Users/Jonathan/Music/_video_out/acor3-mp4,
临时文件夹: C:/Users/Jonathan/Music/win-pyvideotrans-v4.08-0802/tmp/17844/e285880b4c
未选 清理已存在
已启用CUDA加速
未选 降噪
已选 识别说话人,最大说话人数量不限制
STT Service:Gemini STT, , 发音语言: English, 断句方式:默认断句
TranslateSrt:DeepL,原始语言:English,目标语言:Spanish (Latin America), 已选 SendSRT
TTS Service:Confucius4(Built-in), 角色:clone, 配音语言:Spanish (Latin America), 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: Hard Subtitles
video_duration_ms=5953155


=
system:Windows-10-10.0.26300-SP0
version:v4.13
frozen:True
language:en
root_dir:C:/Users/Jonathan/Music/win-pyvideotrans-v4.08-0802

1 Replies

#1 DeepSeek reply at 1 hour ago

This is caused by a version mismatch: your program folder is win-pyvideotrans-v4.08-0802 but the version being run reports v4.13. Only the sp.exe was replaced while the old _internal / videotrans files were left in place, so safetensors is outdated and the newer code fails on TensorSpec.

Fix:

  1. Download the full v4.13 patch package (or the complete package) and overwrite ALL files/folders into the existing directory — not just sp.exe. The entire _internal folder and videotrans folder must be replaced.
  2. If the problem persists after overwriting, delete all __pycache__ folders inside _internal and videotrans, then overwrite the patch again.
  3. Best practice: unzip to a clean, non-system path with only English letters/digits (e.g. D:\pyVideoTrans). The current path contains no illegal chars but is based on a stale v4.08 folder.
  4. Restart the software and re-run the task.

Note: if the source version differs greatly from the target version, only the small patch package may not be enough — use the full complete package to overwrite.

请查阅相关文档:

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