Message387655
| Author |
eryksun |
| Recipients |
eryksun, lac, paul.moore, r.david.murray, steve.dower, tim.golden, vstinner, zach.ware |
| Date |
2021年02月25日.09:21:54 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1614244915.04.0.547927238346.issue25585@roundup.psfhosted.org> |
| In-reply-to |
| Content |
In 3.8+, the DLL search path for dependent DLLs when importing extension modules excludes PATH and the current working directory. So it's far less likely for an import to fail with ERROR_BAD_EXE_FORMAT.
Currently the error message in Python 3 includes the base name of the extension module, e.g. "DLL load failed while importing _spam". No error codes are special cased to use custom error messages, so it still includes the localized error text from the system, which may contain parameterized inserts (%).
The common errors when importing an extension module are missing and mismatched dependent DLLs: ERROR_MOD_NOT_FOUND (126) and ERROR_PROC_NOT_FOUND (127). The system messages for these two errors do not contain inserts. For example, if the UI language is Japanese, a missing DLL dependency raises the following exception:
ImportError: DLL load failed while importing _spam: 指定されたモジュールが見つかりません。 |
|