emcconville / wand

The ctypes-based simple ImageMagick binding for Python
http://docs.wand-py.org/
Other
1.42k stars 199 forks source link

Windows 10: A dynamic link library (DLL) initialization routine failed. #660

Closed VidhuKant closed 3 months ago

VidhuKant commented 3 months ago

I created a small desktop app with PySide6 to convert between image formats. When I call the code that is using Wand to convert everything through the terminal, it works properly.

On the GUI side I have a button that calls the exact function, and I get the following error:

wand.exceptions.ModuleError: unable to load module 'C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\modules\coders\IM_MOD_RL_HEIC_.dll': A dynamic link library (DLL) initialization routine failed.
 @ error/module.c/OpenModule/1293

When I press the button that calls all the wand logic, my cursor turns into the loading icon for a few seconds before this exception occurs. Absolutely no issues on Linux with the same code.

emcconville commented 3 months ago

Can't offer much help here. Wand is working correctly in throwing wand.exceptions.ModuleError. The exception is outside of Wand's control. Why the dll is unable to load needs to be debugged on the OS level and/or runtime.