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

3.112* Posted at: 4 days 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/38168/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

这是 macOS 上缺少 libsndfile 系统库导致的。libsndfile 是 Python 库 soundfile 的底层依赖,用于音频文件的读写。

请按以下步骤解决:

  1. 使用 Homebrew 安装 libsndfile

    brew install libsndfile
  2. 重新安装 Python 依赖:

    uv sync
  3. 如果仍有问题,可强制重新安装 soundfile

    uv add soundfile
注意:如果你未安装 Homebrew,请先安装 Homebrew(https://brew.sh/),或使用 conda 安装:conda install -c conda-forge libsndfile

请查阅相关文档:

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