mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
bpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)
This commit is contained in:
parent
c45a2aa9e2
commit
13c1c3556f
2 changed files with 5 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
Improve the error message when attempting to load a DLL with unresolved
|
||||||
|
dependencies.
|
|
@ -1311,8 +1311,9 @@ static PyObject *load_library(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
if (err == ERROR_MOD_NOT_FOUND) {
|
if (err == ERROR_MOD_NOT_FOUND) {
|
||||||
PyErr_Format(PyExc_FileNotFoundError,
|
PyErr_Format(PyExc_FileNotFoundError,
|
||||||
("Could not find module '%.500S'. Try using "
|
("Could not find module '%.500S' (or one of its "
|
||||||
"the full path with constructor syntax."),
|
"dependencies). Try using the full path with "
|
||||||
|
"constructor syntax."),
|
||||||
nameobj);
|
nameobj);
|
||||||
return NULL;
|
return NULL;
|
||||||
} else if (err) {
|
} else if (err) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue