#2040 pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'D:\\pyvideotrans-3.90\\_internal\\az

39.188.**2 Posted at: 8 months ago

Traceback (most recent call last):
File "pyimod03_ctypes.py", line 77, in init
File "ctypes\__init__.py", line 374, in init
FileNotFoundError: Could not find module 'D:\pyvideotrans-3.90\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll' (or one of its dependencies). Try using the full path with constructor syntax.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\mainwin\_main_win.py", line 75, in _set_Ui_Text
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "videotrans\tts\__init__.py", line 6, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "videotrans\tts\_azuretts.py", line 5, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "azure\cognitiveservices\speech\__init__.py", line 8, in

from .speech import *

File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "azure\cognitiveservices\speech\speech.py", line 13, in

from .interop import (

File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "azure\cognitiveservices\speech\interop.py", line 20, in

_sdk_lib = load_library.LoadLibrary(lib_path)

File "ctypes\__init__.py", line 452, in LoadLibrary
File "pyimod03_ctypes.py", line 79, in init
pyimod03_ctypes.install..PyInstallerImportError: Failed to load dynlib/dll 'D:\pyvideotrans-3.90\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll'. Most likely this dynlib/dll was not found when the application was frozen.


=
system:Windows-10-10.0.26200-SP0
version:v3.90
frozen:True
language:zh
root_dir:D:/pyvideotrans-3.90

1 Replies

#1 DeepSeek reply at 8 months ago

这个错误是由于软件在启动时尝试加载 Azure TTS 的依赖库 Microsoft.CognitiveServices.Speech.core.dll 失败导致的。这通常发生在 Windows 预打包版中,当软件解压路径包含特殊字符或位于系统权限目录时,可能导致某些动态链接库(DLL)加载异常。

请按以下步骤解决:

  1. 移动软件位置(最关键):立即将整个 pyvideotrans-3.90 文件夹从当前路径 D:/pyvideotrans-3.90 移出。

    • 正确做法:在非系统盘(如 D:E:)的根目录下,创建一个纯英文、无空格、无特殊符号的新文件夹,例如 D:\videotrans
    • 错误做法:不要放在 C:\Program FilesC:\Windows、桌面或任何包含中文、空格、括号 ()、方括号 [] 等符号的路径下。
    • pyvideotrans-3.90 文件夹剪切并粘贴到这个新路径下,例如 D:\videotrans\pyvideotrans-3.90
  2. 重新启动软件:进入新的路径(如 D:\videotrans\pyvideotrans-3.90),双击 sp.exe 启动。首次在新位置启动可能需要一些时间加载模块。
  3. (可选)临时禁用 Azure TTS 加载:如果移动后问题依旧,可以尝试在软件启动前,暂时重命名或删除 _internal\azure 文件夹,以跳过 Azure TTS 模块的加载。但这会永久禁用 Azure TTS 功能。

如果以上步骤无法解决问题,请提供移动软件位置并重启后的完整错误日志。

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