Pyinstaller ImportError : DLL load failed while importing win32gui

waghydjemy

The program works fine including the win32gui calls but the executable gives this error

  File "Client.py", line 1, in <module>
ImportError: DLL load failed while importing win32gui: Le module spécifié est introuvable.
[4628] Failed to execute script Client```

I am running on : 
Win 10 
Python 3.8
waghydjemy

Problem was hidden imports

So if someone has the same problem you need to add the missing module when building the executable as follows:

pyinstaller pathToYourPythonFile/script.py --onefile --hidden-import theMissingModule

For my case the missing module was win32gui. After fixing it, it was another one: screenshot_every from d3dshot library

So basically you will face this problem if it was a sub import aka :

from d3dshot import screenshot_every

so screenshot_every is the hidden import ( you will need to do this to reduce the .exe size )

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

From Dev

DLL load failed when importing PySide2, only while debugging

From Python

Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

From Dev

ImportError: DLL load failed, while file is in working directory

From Dev

DLL load failed: The specified module could not be found while importing scipy

From Dev

Pyinstaller ImportError with scipy: DLL load failed

From Dev

How to fix "ImportError: DLL load failed" while importing win32api

From Dev

cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

From Dev

"ImportError: DLL load failed while importing _openmp_helpers"?

From Dev

cx-freeze "ImportError: DLL load failed: %1 is not a valid Win32 application"

From Dev

ImportError: DLL load failed while importing pyexpat: The specified module could not be found

From Dev

pyinstaller ImportError: DLL load failed - only on some PC's

From Dev

Exception has occurred: ImportError DLL load failed while importing pdftotext: The specified module could not be found

From Dev

"ImportError: DLL load failed" when importing tensorflow

From Dev

TensorFlow Error: ImportError: DLL load failed with error code 3221225501 while importing _pywrap_ tensorflow_internal in Python3.8

From Dev

DLL load failed while importing ft2font: The specified module could not be found

From Dev

Jupyter notebook does not launch (ImportError: DLL load failed while importing)

From Dev

ImportError: DLL load failed while importing _psycopg: The specified module could not be found

From Dev

"ImportError: DLL load failed while importing" while using PyInstaller

From Dev

ImportError: DLL load failed: %1 is not a valid Win32 application for _imaging module

From Dev

python cython ImportError: DLL load failed: %1 is not a valid Win32 application

From Dev

Pyinstaller ImportError: DLL load failed: The specified module could not be found

From Dev

How to fix 'ImportError: DLL load failed: The specified procedure could not be found.' while importing tensorflow-gpu?

From Dev

(ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found

From Dev

DLL load failed while importing aggregations: The specified module could not be found pyhton pandas excel files merging

From Dev

How to find which DLL failed in "ImportError: DLL load failed while importing" in python?

From Dev

How to fix "DLL load failed while importing QtWidgets"?

From Dev

ImportError: DLL load failed while importing QtWebKit: Le module spécifié est introuvable

From Dev

ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

Related Related

  1. 1

    ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

  2. 2

    DLL load failed when importing PySide2, only while debugging

  3. 3

    Cannot import from pywinauto: ImportError: DLL load failed while importing win32ui: A dynamic link library (DLL) initialization routine failed

  4. 4

    ImportError: DLL load failed, while file is in working directory

  5. 5

    DLL load failed: The specified module could not be found while importing scipy

  6. 6

    Pyinstaller ImportError with scipy: DLL load failed

  7. 7

    How to fix "ImportError: DLL load failed" while importing win32api

  8. 8

    cx_Freeze ImportError: DLL load failed failed while importing _ctypes: The specified module could not be found

  9. 9

    "ImportError: DLL load failed while importing _openmp_helpers"?

  10. 10

    cx-freeze "ImportError: DLL load failed: %1 is not a valid Win32 application"

  11. 11

    ImportError: DLL load failed while importing pyexpat: The specified module could not be found

  12. 12

    pyinstaller ImportError: DLL load failed - only on some PC's

  13. 13

    Exception has occurred: ImportError DLL load failed while importing pdftotext: The specified module could not be found

  14. 14

    "ImportError: DLL load failed" when importing tensorflow

  15. 15

    TensorFlow Error: ImportError: DLL load failed with error code 3221225501 while importing _pywrap_ tensorflow_internal in Python3.8

  16. 16

    DLL load failed while importing ft2font: The specified module could not be found

  17. 17

    Jupyter notebook does not launch (ImportError: DLL load failed while importing)

  18. 18

    ImportError: DLL load failed while importing _psycopg: The specified module could not be found

  19. 19

    "ImportError: DLL load failed while importing" while using PyInstaller

  20. 20

    ImportError: DLL load failed: %1 is not a valid Win32 application for _imaging module

  21. 21

    python cython ImportError: DLL load failed: %1 is not a valid Win32 application

  22. 22

    Pyinstaller ImportError: DLL load failed: The specified module could not be found

  23. 23

    How to fix 'ImportError: DLL load failed: The specified procedure could not be found.' while importing tensorflow-gpu?

  24. 24

    (ibm_db) ImportError: DLL load failed while importing ibm_db: The specified module could not be found

  25. 25

    DLL load failed while importing aggregations: The specified module could not be found pyhton pandas excel files merging

  26. 26

    How to find which DLL failed in "ImportError: DLL load failed while importing" in python?

  27. 27

    How to fix "DLL load failed while importing QtWidgets"?

  28. 28

    ImportError: DLL load failed while importing QtWebKit: Le module spécifié est introuvable

  29. 29

    ImportError: DLL load failed while importing numpy_ops: The specified module could not be found. when importing spacy in Python

HotTag

Archive