This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jackjansen
Recipients jackjansen
Date 2020-05-12.23:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589324667.53.0.244331207103.issue40610@roundup.psfhosted.org>
In-reply-to
Content
On Windows, when ctypes fails to load a DLL, the error message is misleading. If a dependency of the DLL cannot be found if appears as if the DLL itself cannot be found.

This issue has always existed on Windows (and I know it is due to what the OS provides by default as its error message) but it is exacerbated by the DLL loading rules in Python 3.8 (the `os.add_dll_directory()` changes), because now importing a DLL into Python will follow different rules than those followed by, for example, command line utilities shipped with the DLL you are loading follow.

An ideal fix would be a message of the form "xxx.dll failed to load because its dependency yyy.dll is not on the current Python DLL search path, see zzzz for details". But I am not well-versed enough in Windows APIs to know whether that is even possible.

A fix that is minimal and at least not misleading would be a message "xxx.dll (or one of its dependencies) failed to load. See zzzz for details".
History
Date User Action Args
2020-05-12 23:04:27jackjansensetrecipients: + jackjansen
2020-05-12 23:04:27jackjansensetmessageid: <1589324667.53.0.244331207103.issue40610@roundup.psfhosted.org>
2020-05-12 23:04:27jackjansenlinkissue40610 messages
2020-05-12 23:04:27jackjansencreate