#2073 pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'C:\\Users\\asosm\\OneDrive\\Desktop\

213.238* Posted at: 11 hours ago 👁17

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 'C:\Users\asosm\OneDrive\Desktop\win-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 'C:\Users\asosm\OneDrive\Desktop\win-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.22621-SP0
version:v3.90
frozen:True
language:en
root_dir:C:/Users/asosm/OneDrive/Desktop/win-pyvideotrans-3.90

1 Replies

This error indicates that the Azure TTS module is missing a critical DLL file (Microsoft.CognitiveServices.Speech.core.dll). This is a known issue with the pre-packaged version when it's extracted to a path containing special characters or spaces, particularly within cloud-synced folders like OneDrive.

The core solution is to move the entire software folder to a simple, local directory.

Immediate Steps:

  1. Close pyVideoTrans completely.
  2. Move the entire win-pyvideotrans-3.90 folder from your OneDrive/Desktop to a local directory on your C: or D: drive. For example:

    • C:\videotrans\
    • D:\pyvideotrans\
    • Crucially, ensure the new path contains NO spaces, special characters, or cloud-sync locations.
  3. Run the sp.exe file from this new location.

Why this works: The Azure Speech SDK has strict path requirements. Complex paths (like those with spaces in OneDrive) or cloud-synced folders can interfere with the DLL loading process during the PyInstaller "frozen" application startup.

If the problem persists after moving the folder:

  1. Try downloading the package again from the official website in case the initial download was corrupted.
  2. Ensure your antivirus software is not blocking or quarantining the DLL file. Add the new software folder to your antivirus exclusion list.

This issue is unrelated to your internet connection or API keys; it's a local file loading problem caused by the installation path.

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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions