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.

classification
Title: ImportError: DLL load failed while importing
Type: behavior Stage:
Components: Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: 89z, eric.smith, eryksun
Priority: normal Keywords:

Created on 2022-01-06 04:21 by 89z, last changed 2022-04-11 14:59 by admin.

Messages (5)
msg409815 - (view) Author: Zombo (89z) Date: 2022-01-06 04:21
This code fails:

>>> import _frida
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing _frida: The specified module could not be found.

works as expected with Python 3.9

https://github.com/frida/frida-python/blob/main/frida/__init__.py
msg409825 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2022-01-06 10:45
I see this has been reported in frida's tracker. It looks like a problem with that package.
msg409835 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2022-01-06 12:15
"_frida.cp310-win_amd64.pyd" is a bad build or corrupted file. It imports a procedure with no name from a DLL with no name, which causes the loader to search for a file named ".DLL". Even if that were found, it imports another procedure with no name or correct ordinal from "IPHLPAPI.DLL". There are probably more problems with this DLL.
msg409945 - (view) Author: Zombo (89z) Date: 2022-01-07 01:06
Looks like the issue is not specific to that one package:

Traceback (most recent call last):
File "Lib\site-packages\PyInstaller\hooks\rthooks\pyi_rth_multiprocessing.py", line 17, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing_init_.py", line 16, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing\context.py", line 6, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "multiprocessing\reduction.py", line 16, in
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "socket.py", line 49, in
ImportError: DLL load failed while importing _socket: El parámetro no es correcto.
[8464] Failed to execute script 'pyi_rth_multiprocessing' due to unhandled exception!
msg409952 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2022-01-07 07:46
> ImportError: DLL load failed while importing _socket: El parámetro no es correcto.

I'm not familiar with the implementation of PyInstaller, which is a third-party tool. The above invalid-parameter error may be indirectly related to the problem with frida, or it may be a separate issue. 

The problem with frida is simply that "_frida.cp310-win_amd64.pyd" is an invalid or corrupted DLL that the system can't load. I don't know what went wrong with their build and distribution process that caused the problem. It's something to resolve on the frida issue tracker.
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90434
2022-01-07 07:46:17eryksunsetmessages: + msg409952
2022-01-07 01:06:3489zsetmessages: + msg409945
2022-01-06 12:15:11eryksunsetnosy: + eryksun
messages: + msg409835
2022-01-06 10:45:32eric.smithsettype: crash -> behavior

messages: + msg409825
nosy: + eric.smith
2022-01-06 04:21:3189zcreate