When I tried to run it, something turned off while running it, so I went to the installation folder and ran it, and I got an error as below.
This is the full text of the error.
When I tried to run it, something turned off while running it, so I went to the installation folder and ran it, and I got an error as below.
I've never studied Python myself, but I have to make it this time, so I'm making it.
pyinstaller main.spec => success => dist folder created
NSIS => Success => Setup file created inside the project folder
setup file => installation successful => run abnormal after installation
This is the full text of the error.
[29708] PyInstaller Bootloader 5.x
[29708] LOADER: executable is C:\Program Files (x86)\test\test_contents.exe
[29708] LOADER: homepath is C:\Program Files (x86)\test
[29708] LOADER: _MEIPASS2 is NULL
[29708] LOADER: archivename is C:\Program Files (x86)\test\test_contents.exe
[29708] LOADER: Cookie found at offset 0x89CC8E
[29708] LOADER: No need to extract files to run; setting extractionpath to homepath
[29708] LOADER: SetDllDirectory(C:\Program Files (x86)\test)
[29708] LOADER: Already in the child - running user's code.
[29708] LOADER: Python library: C:\Program Files (x86)\test\python311.dll
[29708] LOADER: Loaded functions from Python library.
[29708] LOADER: Manipulating environment (sys.path, sys.prefix)
[29708] LOADER: sys.prefix is C:\Program Files (x86)\test
[29708] LOADER: Pre-init sys.path is C:\Program Files (x86)\test\base_library.zip;C:\Program Files (x86)\test\lib-dynload;C:\Program Files (x86)\test
[29708] LOADER: Setting runtime options
[29708] LOADER: Initializing python
[29708] LOADER: Overriding Python's sys.path
[29708] LOADER: Post-init sys.path is C:\Program Files (x86)\test\base_library.zip;C:\Program Files (x86)\test\lib-dynload;C:\Program Files (x86)\test
[29708] LOADER: Setting sys.argv
[29708] LOADER: setting sys._MEIPASS
[29708] LOADER: importing modules from CArchive
[29708] LOADER: extracted pyimod00_crypto_key
[29708] LOADER: running unmarshalled code object for pyimod00_crypto_key...
[29708] LOADER: extracted struct
[29708] LOADER: running unmarshalled code object for struct...
[29708] LOADER: extracted pyimod01_archive
[29708] LOADER: running unmarshalled code object for pyimod01_archive...
[29708] LOADER: extracted pyimod02_importers
[29708] LOADER: running unmarshalled code object for pyimod02_importers...
[29708] LOADER: extracted pyimod03_ctypes
[29708] LOADER: running unmarshalled code object for pyimod03_ctypes...
[29708] LOADER: extracted pyimod04_pywin32
[29708] LOADER: running unmarshalled code object for pyimod04_pywin32...
[29708] LOADER: Installing PYZ archive with Python modules.
[29708] LOADER: PYZ archive: PYZ-00.pyz
[29708] LOADER: Running pyiboot01_bootstrap.py
[29708] LOADER: Running pyi_rth_inspect.py
Traceback (most recent call last):
File "PyInstaller\loader\pyimod02_importers.py", line 159, in get_code
File "PyInstaller\loader\pyimod01_archive.py", line 197, in extract
zlib.error: Error -3 while decompressing data: incorrect header check
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "PyInstaller\hooks\rthooks\pyi_rth_inspect.py", line 47, in <module>
File "PyInstaller\hooks\rthooks\pyi_rth_inspect.py", line 14, in _pyi_rthook
File "PyInstaller\loader\pyimod02_importers.py", line 366, in exec_module
File "PyInstaller\loader\pyimod02_importers.py", line 161, in get_code
ImportError: PyiFrozenImporter cannot handle module 'inspect'
[29708] Failed to execute script 'pyi_rth_inspect' due to unhandled exception!
[29708] LOADER: OK.
[29708] LOADER: Manually flushing stdout and stderr
[29708] LOADER: Cleaning up Python interpreter.
Run normally on the source. I wanted it to be installed and run normally during installation. But it doesn't work normally.
pyinstaller main.spec
main.spec
block_cipher = pyi_crypto.PyiBlockCipher(key='**test**')
a = Analysis(['main.py'],
pathex=['D:\\01.Workspace\\python\\test_contents'],
binaries=[],
datas=[
('./ui/*', './ui')
],
hiddenimports=[
'config',
.
.
.
'lib.CommonUtil',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='concat_contents',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name='main')