Skip to content

Commit 13c1c35

Browse files
ZackerySpytzzooba
authored andcommitted
bpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)
1 parent c45a2aa commit 13c1c35

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Improve the error message when attempting to load a DLL with unresolved
2+
dependencies.

Modules/_ctypes/callproc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,9 @@ static PyObject *load_library(PyObject *self, PyObject *args)
13111311

13121312
if (err == ERROR_MOD_NOT_FOUND) {
13131313
PyErr_Format(PyExc_FileNotFoundError,
1314-
("Could not find module '%.500S'. Try using "
1315-
"the full path with constructor syntax."),
1314+
("Could not find module '%.500S' (or one of its "
1315+
"dependencies). Try using the full path with "
1316+
"constructor syntax."),
13161317
nameobj);
13171318
return NULL;
13181319
} else if (err) {

0 commit comments

Comments
 (0)