Anki Forums

Failed to execute script pyi_rth_win32comgenpy

I am on the latest update for windows 7, I have downloaded both these updates Download Windows 10 Universal C Runtime from Official Microsoft Download Center and this https://aka.ms/vs/15/release/vc_redist.x64.exe I have downloaded both python 2.7.14 and python 3.4.1 and still nothing, I tried googling it but people seem to only have the Failed to execute script pyi_rth_multiprocessing error but not the win32comgenpy one, I am currently running on Windows 7 SP1 and I have a HP Pro 645 G1 laptop. Also I tried to install the latest version and the one for x64bit and both do not work.

Also worth noting that this is the log details of when I run it on cmd if it’s going to be of any help
[5352] PyInstaller Bootloader 3.x
[5352] LOADER: executable is C:\Program Files\Anki\anki-console.exe
[5352] LOADER: homepath is C:\Program Files\Anki
[5352] LOADER: _MEIPASS2 is NULL
[5352] LOADER: archivename is C:\Program Files\Anki\anki-console.exe
[5352] LOADER: C:\Program Files\Anki\anki-console.exe contains a digital signatu
re
[5352] LOADER: No need to extract files to run; setting extractionpath to homepa
th
[5352] LOADER: SetDllDirectory(C:\Program Files\Anki)
[5352] LOADER: Already in the child - running user’s code.
[5352] LOADER: Python library: C:\Program Files\Anki\python38.dll
[5352] LOADER: Loaded functions from Python library.
[5352] LOADER: Manipulating environment (sys.path, sys.prefix)
[5352] LOADER: sys.prefix is C:\Program Files\Anki
[5352] LOADER: Pre-init sys.path is C:\Program Files\Anki\base_library.zip;C:\Pr
ogram Files\Anki
[5352] LOADER: Setting runtime options
[5352] LOADER: Initializing python
[5352] LOADER: Overriding Python’s sys.path
[5352] LOADER: Post-init sys.path is C:\Program Files\Anki\base_library.zip;C:\P
rogram Files\Anki
[5352] LOADER: Setting sys.argv
[5352] LOADER: setting sys.MEIPASS
[5352] LOADER: importing modules from CArchive
[5352] LOADER: extracted struct
[5352] LOADER: callfunction returned…
[5352] LOADER: extracted pyimod01_os_path
[5352] LOADER: callfunction returned…
[5352] LOADER: extracted pyimod02_archive
[5352] LOADER: callfunction returned…
[5352] LOADER: extracted pyimod03_importers
[5352] LOADER: callfunction returned…
[5352] LOADER: Installing PYZ archive with Python modules.
[5352] LOADER: PYZ archive: PYZ-00.pyz
[5352] LOADER: Running pyiboot01_bootstrap.py
[5352] LOADER: Running pyi_rth_win32comgenpy.py
Traceback (most recent call last):
File “Lib\site-packages\pyinstaller-4.0.dev0-py3.8.egg\PyInstaller\hooks\rthoo
ks\pyi_rth_win32comgenpy.py”, line 49, in
File “C:\release\lib\site-packages\pyinstaller-4.0.dev0-py3.8.egg\PyInstaller
loader\pyimod03_importers.py”, line 497, in exec_module
File "win32com_init
.py", line 5, in
ImportError: DLL load failed while importing win32api: The parameter is incorrec
t.
[5352] Failed to execute script pyi_rth_win32comgenpy
[5352] LOADER: OK.
[5352] LOADER: Manually flushing stdout and stderr
[5352] LOADER: Cleaning up Python interpreter.

Can you tell me how to solve this issue?
Thanks in advance

This could be helpful:

2 Likes

I have been on my computer for nearly 10 hours right now and literally reinstalled windows completely from scratch.
I don’t know how to thank you, man.

1 Like

If you have a trouble with Windows 7 Failed to execute script pyi_rth_win32comgenpy you should update your windows 7 system by two updates: KB4474419 , KB4490628
Ели не запускается программа на Windows 7 и выдает ошибку: Failed to execute script pyi_rth_win32comgenpy
то нужно обновить систему. Нужно скачать и установить два обновления.

KB4474419: SHA-2 code signing support update
https://www.catalog.update.microsoft.com/Search.aspx?q=kb4490628

KB4490628: Servicing stack update
https://www.catalog.update.microsoft.com/Search.aspx?q=kb4474419