Eryk Sun <eryk...@gmail.com> added the comment:

> " 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.

That's the old error. bpo-36085 changed it to FileNotFoundError, with the 
message "Could not find module '%.500S'. Try using the full path with 
constructor syntax." bpo-39393 modified the message to "Could not find module 
'%.500S' (or one of its dependencies). Try using the full path with constructor 
syntax."

IMO, the most direct way to resolve the problem is by enabling "loader snaps" 
for python.exe via gflags and attaching a native debugger to the process. The 
loader outputs debug strings that show the computed DLL search path (from 
LdrpComputeLazyDllPath), each attempt to resolve the dependent DLL to a 
directory in the search path (via LdrpResolveDllName), and the final result 
from loader's work queue (from LdrpProcessWork), which includes the dependent 
DLL that caused loading to fail and the parent module (DLL or EXE) that depends 
on it.

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25655>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to