This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients The Compiler, eryksun, miss-islington, never-eat-yellow-snow, paul.moore, pombredanne, steve.dower, tim.golden, zach.ware
Date 2020-10-22.15:50:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1603381830.44.0.448855283923.issue25655@roundup.psfhosted.org>
In-reply-to
Content
Steve, the PR that you pushed has the wrong error and error message. I told Philippe in msg377335 that ctypes raises FileNotFoundError with no error code. For example:

    >>> try: ctypes.CDLL('spam')
    ... except OSError as e: err = e
    ...
    >>> err
    FileNotFoundError("Could not find module 'spam' (or one of its dependencies). Try using the full path with constructor syntax.")
    >>> err.winerror is None
    True

The advice to use dumpbin is fine and works well in simple cases. I wouldn't use it generally since recursiveley parsing through the dependency graph of every dependent DLL could be tedious.
History
Date User Action Args
2020-10-22 15:50:30eryksunsetrecipients: + eryksun, paul.moore, tim.golden, zach.ware, steve.dower, The Compiler, pombredanne, never-eat-yellow-snow, miss-islington
2020-10-22 15:50:30eryksunsetmessageid: <1603381830.44.0.448855283923.issue25655@roundup.psfhosted.org>
2020-10-22 15:50:30eryksunlinkissue25655 messages
2020-10-22 15:50:30eryksuncreate