Home >Backend Development >Python Tutorial >Why Does Loading a DLL with Python\'s CTypes Throw OSError: [WinError 193] %1 is not a valid Win32 application?
Python CTypes - Loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application
This error occurs when Python's CTypes library attempts to load a dynamic link library (DLL) with an invalid format. The underlying Windows error code is ERROR_BAD_EXE_FORMAT (193), indicating that the file is not a valid PE (Portable Executable) image.
Causes:
Resolution:
The above is the detailed content of Why Does Loading a DLL with Python\'s CTypes Throw OSError: [WinError 193] %1 is not a valid Win32 application?. For more information, please follow other related articles on the PHP Chinese website!