[issue39393] Misleading error message upon dependent DLL resolution failure
Eryk Sun
report at bugs.python.org
Mon Jan 20 11:20:30 EST 2020
Eryk Sun <eryksun at gmail.com> added the comment:
That clarification seems okay to me. The error message is in load_library in Modules/_ctypes/callproc.c.
The underlying problem is that the directory of the DLL is only added to the search path (in CDLL.__init__ in Lib/ctypes/__init__.py) if the caller uses a qualified path. This is an OS limit that we can't avoid.
Also note that the suggestion to use a qualified path won't necessarily resolve the problem, in which case scripts will have to use os.add_dll_directory, and find a reliable way to identify the required directories.
----------
components: +Extension Modules
keywords: +easy (C)
nosy: +eryksun
stage: -> needs patch
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39393>
_______________________________________
More information about the Python-bugs-list
mailing list