[New-bugs-announce] [issue41836] Improve ctypes error reporting with missing DLL path

Philippe Ombredanne report at bugs.python.org
Tue Sep 22 10:04:23 EDT 2020


New submission from Philippe Ombredanne <pombredanne at nexb.com>:

When the dependency of a DLL is missing (at least on Windows) the error " OSError: [WinError 126] The specified module could not be found" is raised when calling ctypes.CDLL(dll_path) even when this "dll_path" exists... because the error comes from another DLL.

These errors are really hard to diagnose because the path of the missing DLL is not returned in the exception message. Returning it would help fixing these kind of errors quickly.

Researching errors such as this one https://github.com/nexB/scancode-toolkit/issues/2236 wastes quite a bit of time and would be made a non issue if we had the path in the error message.

----------
components: ctypes
messages: 377322
nosy: pombredanne
priority: normal
severity: normal
status: open
title: Improve ctypes error reporting with missing DLL path
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41836>
_______________________________________


More information about the New-bugs-announce mailing list