Message368748
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". |
|
Date |
User |
Action |
Args |
2020-05-12 23:04:27 | jackjansen | set | recipients:
+ jackjansen |
2020-05-12 23:04:27 | jackjansen | set | messageid: <1589324667.53.0.244331207103.issue40610@roundup.psfhosted.org> |
2020-05-12 23:04:27 | jackjansen | link | issue40610 messages |
2020-05-12 23:04:27 | jackjansen | create | |
|