]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39393: Misleading error message on dependent DLL resolution failure (GH-18093)
authorZackery Spytz <zspytz@gmail.com>
Tue, 28 Jan 2020 09:42:43 +0000 (02:42 -0700)
committerSteve Dower <steve.dower@python.org>
Tue, 28 Jan 2020 09:42:43 +0000 (20:42 +1100)
Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst [new file with mode: 0644]
Modules/_ctypes/callproc.c

diff --git a/Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst b/Misc/NEWS.d/next/Windows/2020-01-20-23-42-53.bpo-39393.gWlJDG.rst
new file mode 100644 (file)
index 0000000..025b7e9
--- /dev/null
@@ -0,0 +1,2 @@
+Improve the error message when attempting to load a DLL with unresolved
+dependencies.
index 7b13fa041a205c542e729b1f0dd4723a8a9f1463..65c6eb15a298b93e7fc4aefd312414a92ac3891d 100644 (file)
@@ -1311,8 +1311,9 @@ static PyObject *load_library(PyObject *self, PyObject *args)
 
     if (err == ERROR_MOD_NOT_FOUND) {
         PyErr_Format(PyExc_FileNotFoundError,
-                     ("Could not find module '%.500S'. Try using "
-                      "the full path with constructor syntax."),
+                     ("Could not find module '%.500S' (or one of its "
+                      "dependencies). Try using the full path with "
+                      "constructor syntax."),
                      nameobj);
         return NULL;
     } else if (err) {