Pyinstaller doesn't pick up selectolax
?
#8703
-
Hi, after building a package containing PyInstaller\hooks\rthooks\pyi_rth_pkgres.py:36: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
File "cli.py", line 2, in <module>
File "builder\staff.py", line 2, in <module>
File "selectolax\__init__.py", line 10, in <module>
ImportError: cannot import name 'modest' from partially initialized module 'selectolax' (most likely due to a circular import) (C:\Users\baseplate-admin\AppData\Local\Temp\_MEI191562\selectolax\__init__.pyc)
[2272] Failed to execute script 'cli' due to unhandled exception! And i have this spec file # -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['src\\shiinobi\\cli.py'],
pathex=['src\\shiinobi'],
binaries=[],
datas=[],
hiddenimports=['selectolax'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=True,
optimize=2,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='__main__',
debug=False,
bootloader_ignore_signals=False,
strip=True,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Looks like Can you try adding Alternatively, collecting data files from |
Beta Was this translation helpful? Give feedback.
Looks like
selectolax.modest
is not collected, and at least in the latest version ofselectolax
, it seems to be a namespace package without any modules (it's a directory with.pxi
files).Can you try adding
selectolax.modest
tohiddenimports
?Alternatively, collecting data files from
selectolax
might also do the trick (addfrom PyInstaller.utils.hooks import collect_data_files
and then dodatas=collect_data_files('selectolax')
), because it will ensure thatselectolax/modest
directory exists on filesystem.