#5743 系统错误 (None):NoneTraceback (most recent call last):

3.112.**7 Posted at: 1 month ago

系统错误 (None):None
Traceback (most recent call last):
File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/soundfile.py", line 267, in

_snd = _ffi.dlopen('sndfile')

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/wygon/pyvideotrans/videotrans/task/only_one.py", line 46, in run

trk.recogn()

File "/Users/wygon/pyvideotrans/videotrans/task/_stage_recogn.py", line 62, in recogn

raw_subtitles = run_recogn(

File "/Users/wygon/pyvideotrans/videotrans/recognition/__init__.py", line 201, in run

_cls: Union[Type[BaseRecogn], None] = get_class(recogn_type, "recognition", _ID_NAME_DICT)

File "/Users/wygon/pyvideotrans/videotrans/__init__.py", line 28, in get_class

module = importlib.import_module(f'videotrans.{provider_type}{_module_map.imp}', __name__)

File "/Users/wygon/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/importlib/__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/wygon/pyvideotrans/videotrans/recognition/_whisper.py", line 13, in

from videotrans.process import openai_whisper, faster_whisper

File "/Users/wygon/pyvideotrans/videotrans/process/__init__.py", line 2, in

from .tts_fun import qwen3tts_fun

File "/Users/wygon/pyvideotrans/videotrans/process/tts_fun.py", line 9, in

import soundfile as sf

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/soundfile.py", line 276, in

_snd = _ffi.dlopen(_os.path.join(

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen

lib, function_cache = _make_ffi_library(self, name, flags)

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 834, in _make_ffi_library

backendlib = _load_backend_lib(backend, libname, flags)

File "/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/cffi/api.py", line 829, in _load_backend_lib

raise OSError(msg)

OSError: cannot load library '/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib': dlopen(/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib, 0x0002): tried: '/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file), '/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib' (no such file). Additionally, ctypes.util.find_library() did not manage to locate a library called '/Users/wygon/pyvideotrans/.venv/lib/python3.10/site-packages/_soundfile_data/libsndfile.dylib'

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: /Users/wygon/Desktop/1/22/微信视频2026-07-10_094018_065.mp4,
输出结果保存到文件夹: /Users/wygon/Desktop/1/33/微信视频2026-07-10_094018_065-mp4,
临时文件夹: /Users/wygon/pyvideotrans/tmp/37342/15eba6a278
已选 清理已存在
未选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: medium, 发音语言: 日语, 断句方式:默认断句
翻译渠道:Google(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 不嵌入字幕
已选 仅输出mp4
代理地址:


=
system:macOS-26.5-arm64-arm-64bit
version:v4.05
frozen:False
language:zh
root_dir:/Users/wygon/pyvideotrans
Python: 3.10.19 (main, Feb 12 2026, 00:36:33) [Clang 21.1.4 ]

1 Replies

#1 DeepSeek reply at 1 month ago

这是由于缺少系统底层音频库 libsndfile 导致的。macOS 上需要通过 Homebrew 安装该库。

解决方案:

  1. 确保已安装 Homebrew(如未安装请先安装:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)")。
  2. 在终端中执行以下命令安装 libsndfile

    brew install libsndfile
  3. 安装后重启终端,并在 pyVideoTrans 源码目录下重新运行:

    uv run sp.py

如果上述步骤后问题依然存在,请检查是否已正确安装 FFmpeg(brew install ffmpeg),因为 pyVideoTrans 也依赖 FFmpeg。若仍有错误,请提供安装新的日志片段。

Thinking...
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

Related resource