How does one get from "ImportError: DLL load failed:..." to a culprit .dll and symbol?
Chris Cormie
ccormie at aussiemail.com.au
Mon Feb 23 21:49:41 EST 2009
Mark Hammond wrote:
> On 23/02/2009 11:41 PM, Chris Cormie wrote:
>>
>>> If that not-very-technical description [all I've ever needed] doesn't
>>> help, you'll need to read the DW help file (HTFF1K) or wait till
>>> someone who knows what they are doing comes along :-)
>>
>> LOL, I am that person :p
>
> LOL sounds right!
>
>> How do you get *Python* to tell you the dll and the problem symbol? Not
>> external tools, Python. Python at a low level is calling LoadLibrary and
>> GetProcAddress to resolve symbols and the call fails.
>
> It is the LoadLibrary that is failing; it should be obvious that if it
> was a simple GetProcAddress that was failing, Python would simply throw
> an exception rather than displaying the ugly dialog box you see.
I'm talking about the whole class of errors when loading an extension,
the LoadLibary succeeds but the GetProcAddress fails. Not one specific
error, a class of errors and *by definition* from the original question
LoadLibrary succeeds. That's the point: at some point in this common
scenario we have the path to the dll and a symbol we are resolving, and
the symbol name, yet for whatever reason the GetProcAddress lookup
fails, resulting in a surprisingly uninformative errors message.
Regards,
Chris.
More information about the Python-list
mailing list