pyinstaller / pyinstaller

Freeze (package) Python programs into stand-alone executables
http://www.pyinstaller.org
Other
11.91k stars 1.94k forks source link

Encounter error `Loader FrozenImporter` sometimes on a repl like command line #4821

Closed mirhmousavi closed 4 years ago

mirhmousavi commented 4 years ago

Description of the issue

We have made a command-line application with click and it's kind of a repl, I mean user logs in to this command-line and issues commands the problem is that sometimes we encounter Loader FrozenImporter and it's just sometimes two weeks ago we encounter error for _strptime and add the hidden import for it but that occurs again also we get another error for click._textwrap this is the spec file that we always use

import sys
sys.path.append('.')

from PyInstaller.utils.hooks import collect_submodules

block_cipher = None

hiddenimports = []
hiddenimports += collect_submodules("celery")
hiddenimports += collect_submodules("celery.fixups")
hiddenimports += collect_submodules("celery.app.amqp")
hiddenimports += collect_submodules("cryptography.hazmat.backends.openssl")

hiddenimports += collect_submodules("click")
hiddenimports += collect_submodules("os")
hiddenimports += collect_submodules("_strptime")
hiddenimports += collect_submodules("src")

a = Analysis(
    ["../__main__.py"],
    binaries=[],
    datas=[],
    hiddenimports=hiddenimports,
    hookspath=[],
    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,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name="XXX",
    debug=False,
    bootloader_ignore_signals=False,
    strip=True,
    upx=False,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=True,
)

Context information (for bug reports)

thanks for the great job you have done

Legorooj commented 4 years ago

Can you try PyInstaller 3.6? And what's the actual output? I use click for all of my command line needs, and I've never had a problem.

mirhmousavi commented 4 years ago
make: [build] Error 1 (ignored)
pyinstaller spec/XXX.spec --distpath . --workpath /tmp --clean
53 INFO: PyInstaller: 3.5
54 INFO: Python: 3.6.8
85 INFO: Platform: Linux-4.14.34-1-x86_64-with-centos-7.2.1511-Core
87 INFO: UPX is not available.
88 INFO: Removing temporary files and cleaning cache in /root/.cache/pyinstaller
/usr/local/lib/python3.6/site-packages/peewee.py:3910: UserWarning: Unable to determine MySQL version: "5.5.50-mariadb"
2901 INFO: Extending PYTHONPATH with paths
['/root/XXX']
2901 INFO: checking Analysis
2903 INFO: Building Analysis because Analysis-00.toc is non existent
2903 INFO: Initializing module dependency graph...
2908 INFO: Caching module graph hooks...
2914 INFO: Analyzing base_library.zip ...
6642 INFO: Caching module dependency graph...
6724 INFO: running Analysis Analysis-00.toc
6744 INFO: Analyzing __main__.py
7024 INFO: Processing pre-safe import module hook   six.moves
8043 INFO: Processing pre-find module path hook   distutils
8043 INFO: distutils: retargeting to non-venv dir '/usr/lib64/python3.6'
21996 INFO: Processing pre-safe import module hook   setuptools.extern.six.moves
22528 INFO: Processing pre-find module path hook   site
22529 INFO: site: retargeting to fake-dir '/usr/local/lib/python3.6/site-packages/PyInstaller/fake-modules'
26592 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
27707 INFO: Analyzing hidden import 'celery.app.amqp'
27745 INFO: Analyzing hidden import 'celery.backends.cache'
27809 INFO: Analyzing hidden import 'celery.backends.filesystem'
27812 INFO: Analyzing hidden import 'celery.events.snapshot'
27929 INFO: Analyzing hidden import 'celery.backends.s3'
27933 INFO: Analyzing hidden import 'celery.worker.consumer.mingle'
28028 INFO: Analyzing hidden import 'celery.apps.worker'
28132 INFO: Analyzing hidden import 'celery.fixups'
28159 INFO: Analyzing hidden import 'celery.bin.migrate'
28227 INFO: Analyzing hidden import 'celery.concurrency.thread'
28269 INFO: Analyzing hidden import 'celery.backends.rpc'
28294 INFO: Analyzing hidden import 'celery.loaders.default'
28296 INFO: Analyzing hidden import 'celery.bin.beat'
28299 INFO: Analyzing hidden import 'celery.bin.graph'
28309 INFO: Analyzing hidden import 'celery.concurrency.prefork'
28367 INFO: Analyzing hidden import 'celery.contrib.testing.worker'
28426 INFO: Analyzing hidden import 'celery.fixups.django'
28434 INFO: Analyzing hidden import 'celery.backends.elasticsearch'
28440 INFO: Analyzing hidden import 'celery.contrib.testing.manager'
28449 INFO: Analyzing hidden import 'celery.bin.worker'
28461 INFO: Analyzing hidden import 'celery.bin.amqp'
28474 INFO: Analyzing hidden import 'celery.backends.arangodb'
28480 INFO: Analyzing hidden import 'celery.backends.cassandra'
28487 INFO: Analyzing hidden import 'celery.bin.purge'
28490 INFO: Analyzing hidden import 'celery.beat'
28515 INFO: Analyzing hidden import 'celery.events.cursesmon'
28537 INFO: Analyzing hidden import 'celery.contrib.testing.app'
28541 INFO: Analyzing hidden import 'celery.backends.dynamodb'
28554 INFO: Analyzing hidden import 'celery.bin.multi'
28568 INFO: Analyzing hidden import 'celery.bin.shell'
28582 INFO: Analyzing hidden import 'celery.apps.beat'
28589 INFO: Analyzing hidden import 'celery.contrib.abortable'
28591 INFO: Analyzing hidden import 'celery.bin.list'
28593 INFO: Analyzing hidden import 'celery.backends.azureblockblob'
28599 INFO: Analyzing hidden import 'celery.backends.redis'
28763 INFO: Analyzing hidden import 'celery.contrib.testing.mocks'
29000 INFO: Analyzing hidden import 'celery.backends.database.models'
32645 INFO: Analyzing hidden import 'celery.worker.components'
32655 INFO: Analyzing hidden import 'celery.__main__'
32740 INFO: Analyzing hidden import 'celery.concurrency.solo'
32742 INFO: Analyzing hidden import 'celery.concurrency.gevent'
32748 INFO: Analyzing hidden import 'celery.app.log'
32756 INFO: Analyzing hidden import 'celery.worker.autoscale'
32763 INFO: Analyzing hidden import 'celery.app.control'
32795 INFO: Analyzing hidden import 'celery.backends.amqp'
32808 INFO: Analyzing hidden import 'celery.backends.couchdb'
32813 INFO: Analyzing hidden import 'celery.contrib.pytest'
36831 INFO: Analyzing hidden import 'celery.backends.mongodb'
36842 INFO: Analyzing hidden import 'celery.contrib.sphinx'
36846 INFO: Analyzing hidden import 'celery.backends.riak'
36851 INFO: Analyzing hidden import 'celery.backends.consul'
36854 INFO: Analyzing hidden import 'celery.events.state'
36882 INFO: Analyzing hidden import 'celery.concurrency.eventlet'
36889 INFO: Analyzing hidden import 'celery.worker.strategy'
36897 INFO: Analyzing hidden import 'celery.backends.couchbase'
36902 INFO: Analyzing hidden import 'celery.backends.cosmosdbsql'
36909 INFO: Analyzing hidden import 'celery.app.events'
36912 INFO: Analyzing hidden import 'src.helpers.sqlite'
36914 INFO: Analyzing hidden import 'src.lib.pySMART'
36980 INFO: Analyzing hidden import 'src.resources.hardware.adaptor'
36981 INFO: Analyzing hidden import 'src.helpers.progress'
36983 INFO: Analyzing hidden import 'src.helpers.os'
36983 INFO: Analyzing hidden import 'src.lib.humanize.filesize'
37027 INFO: Analyzing hidden import 'src.resources.modules.performance.storage'
37030 INFO: Analyzing hidden import 'src.resources.modules.performance.network'
37032 INFO: Analyzing hidden import 'src.lib.kryptonite.kryptonite.__main__'
37035 INFO: Analyzing hidden import 'src.lib.celery.tasks'
37036 INFO: Analyzing hidden import 'src.resources.modules.hardware_status.models'
37036 INFO: Analyzing hidden import 'src.resources.modules.disk.helpers'
37037 INFO: Analyzing hidden import 'src.core.migration'
37052 INFO: Analyzing hidden import 'src.resources.hardware.power_supply'
37054 INFO: Analyzing hidden import 'src.resources.hardware.fan'
37056 INFO: Analyzing hidden import 'src.resources.hardware.motherboard'
37057 INFO: Analyzing hidden import 'src.lib.kryptonite.setup'
37058 INFO: Analyzing hidden import 'src.core.request'
37059 INFO: Analyzing hidden import 'src.resources.modules.system_stat.models'
37061 INFO: Processing module hooks...
37061 INFO: Loading module hook "hook-numpy.core.py"...
37194 INFO: Loading module hook "hook-importlib_metadata.py"...
37197 INFO: Loading module hook "hook-numpy.py"...
37197 INFO: Loading module hook "hook-setuptools.py"...
37816 INFO: Loading module hook "hook-sqlite3.py"...
37874 INFO: Loading module hook "hook-pycparser.py"...
37875 INFO: Loading module hook "hook-lib2to3.py"...
37878 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
37879 INFO: Loading module hook "hook-shelve.py"...
37891 INFO: Loading module hook "hook-certifi.py"...
37892 INFO: Loading module hook "hook-nacl.py"...
37894 INFO: Loading module hook "hook-sysconfig.py"...
37902 INFO: Loading module hook "hook-xml.dom.domreg.py"...
37902 INFO: Loading module hook "hook-sqlalchemy.py"...
38137 INFO:   Found 4 sqlalchemy hidden imports
38139 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found!
38155 INFO: Excluding import 'sqlalchemy.testing'
38161 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.orm.util
38161 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing
38161 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing
38161 INFO:   Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing
38161 INFO:   Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing.warnings from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing
38162 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.config
38162 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.mock
38162 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing.exclusions from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing.mock from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing.assertsql from module sqlalchemy.testing.assertions
38162 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.assertsql
38163 INFO:   Removing import of sqlalchemy.testing.engines from module sqlalchemy.testing.util
38163 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.util
38163 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.util
38163 INFO:   Removing import of sqlalchemy.testing.util from module sqlalchemy.testing.engines
38163 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.engines
38163 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.engines
38163 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.engines
38165 INFO:   Removing import of sqlalchemy.testing.config from module sqlalchemy.testing.exclusions
38165 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.exclusions
38165 INFO:   Removing import of sqlalchemy.testing from module sqlalchemy.testing.warnings
38165 INFO:   Removing import of sqlalchemy.testing.assertions from module sqlalchemy.testing.warnings
38166 INFO: Loading module hook "hook-pytz.py"...
38185 INFO: Loading module hook "hook-pydoc.py"...
38186 INFO: Loading module hook "hook-pkg_resources.py"...
38876 INFO: Processing pre-safe import module hook   win32com
38915 INFO: Excluding import '__main__'
38919 INFO:   Removing import of __main__ from module pkg_resources
38919 INFO: Loading module hook "hook-pygments.py"...
40827 INFO: Loading module hook "hook-encodings.py"...
40914 INFO: Loading module hook "hook-gevent.py"...
41048 INFO: Determining a mapping of distributions to packages...
60976 WARNING: Unable to find package for requirement greenlet from package gevent.
60976 INFO: Packages required by gevent:
[]
62451 INFO: Loading module hook "hook-cryptography.py"...
62702 INFO: Loading module hook "hook-pytest.py"...
63450 INFO: Loading module hook "hook-xml.py"...
63451 INFO: Loading module hook "hook-distutils.py"...
63451 INFO: Loading module hook "hook-jinja2.py"...
63558 INFO: Looking for ctypes DLLs
63620 WARNING: library user32 required via ctypes not found
64783 INFO: Analyzing run-time hooks ...
64819 INFO: Including run-time hook 'pyi_rth_pkgres.py'
64822 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
64826 INFO: Including run-time hook 'pyi_rth_certifi.py'
64883 INFO: Looking for dynamic libraries
66546 INFO: Looking for eggs
66546 INFO: Using Python library /lib64/libpython3.6m.so.1.0
66593 INFO: Warnings written to /tmp/XXX/warn-smcli.txt
66985 INFO: Graph cross-reference written to /tmp/smcli/xref-smcli.html
67130 INFO: checking PYZ
67130 INFO: Building PYZ because PYZ-00.toc is non existent
67130 INFO: Building PYZ (ZlibArchive) /tmp/smcli/PYZ-00.pyz
70547 INFO: Building PYZ (ZlibArchive) /tmp/smcli/PYZ-00.pyz completed successfully.
70608 INFO: checking PKG
70608 INFO: Building PKG because PKG-00.toc is non existent
70608 INFO: Building PKG (CArchive) PKG-00.pkg
70621 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_struct.cpython-36m-x86_64-linux-gnu.so
70635 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/zlib.cpython-36m-x86_64-linux-gnu.so
70660 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libpython3.6m.so.1.0
70684 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_datetime.cpython-36m-x86_64-linux-gnu.so
70698 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/math.cpython-36m-x86_64-linux-gnu.so
70710 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/binascii.cpython-36m-x86_64-linux-gnu.so
70728 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/select.cpython-36m-x86_64-linux-gnu.so
70747 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_socket.cpython-36m-x86_64-linux-gnu.so
70765 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_ssl.cpython-36m-x86_64-linux-gnu.so
70784 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_posixsubprocess.cpython-36m-x86_64-linux-gnu.so
70802 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/resource.cpython-36m-x86_64-linux-gnu.so
70821 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_random.cpython-36m-x86_64-linux-gnu.so
70838 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_bisect.cpython-36m-x86_64-linux-gnu.so
70860 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_hashlib.cpython-36m-x86_64-linux-gnu.so
70877 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_sha3.cpython-36m-x86_64-linux-gnu.so
70895 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_blake2.cpython-36m-x86_64-linux-gnu.so
70911 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_sha512.cpython-36m-x86_64-linux-gnu.so
70925 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_sha256.cpython-36m-x86_64-linux-gnu.so
70941 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_md5.cpython-36m-x86_64-linux-gnu.so
70963 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_sha1.cpython-36m-x86_64-linux-gnu.so
70987 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/pyexpat.cpython-36m-x86_64-linux-gnu.so
71005 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/termios.cpython-36m-x86_64-linux-gnu.so
71028 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/unicodedata.cpython-36m-x86_64-linux-gnu.so
71053 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_decimal.cpython-36m-x86_64-linux-gnu.so
71075 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/mmap.cpython-36m-x86_64-linux-gnu.so
71097 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_ctypes.cpython-36m-x86_64-linux-gnu.so
71114 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/array.cpython-36m-x86_64-linux-gnu.so
71131 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/grp.cpython-36m-x86_64-linux-gnu.so
71146 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_lzma.cpython-36m-x86_64-linux-gnu.so
71163 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_bz2.cpython-36m-x86_64-linux-gnu.so
71181 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/readline.cpython-36m-x86_64-linux-gnu.so
71196 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_opcode.cpython-36m-x86_64-linux-gnu.so
71211 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_pickle.cpython-36m-x86_64-linux-gnu.so
71233 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_multiprocessing.cpython-36m-x86_64-linux-gnu.so
71252 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_json.cpython-36m-x86_64-linux-gnu.so
71272 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_cffi_backend.cpython-36m-x86_64-linux-gnu.so
71306 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/cryptography/hazmat/bindings/_openssl.abi3.so
71334 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/cryptography/hazmat/bindings/_constant_time.abi3.so
71353 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/cryptography/hazmat/bindings/_padding.abi3.so
71381 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_sqlite3.cpython-36m-x86_64-linux-gnu.so
71406 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/greenlet.cpython-36m-x86_64-linux-gnu.so
71423 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/simplejson/_speedups.cpython-36m-x86_64-linux-gnu.so
71438 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/fcntl.cpython-36m-x86_64-linux-gnu.so
71454 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_asyncio.cpython-36m-x86_64-linux-gnu.so
71468 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/markupsafe/_speedups.cpython-36m-x86_64-linux-gnu.so
71488 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_csv.cpython-36m-x86_64-linux-gnu.so
71510 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_brotli.cpython-36m-x86_64-linux-gnu.so
71528 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/syslog.cpython-36m-x86_64-linux-gnu.so
71551 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_curses.cpython-36m-x86_64-linux-gnu.so
71576 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/parser.cpython-36m-x86_64-linux-gnu.so
71604 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/core/_multiarray_tests.cpython-36m-x86_64-linux-gnu.so
71626 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_elementtree.cpython-36m-x86_64-linux-gnu.so
71652 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/psutil/_psutil_posix.cpython-36m-x86_64-linux-gnu.so
71669 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/psutil/_psutil_linux.cpython-36m-x86_64-linux-gnu.so
71776 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/core/_multiarray_umath.cpython-36m-x86_64-linux-gnu.so
71823 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/mtrand.cpython-36m-x86_64-linux-gnu.so
71847 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_sfc64.cpython-36m-x86_64-linux-gnu.so
71868 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_philox.cpython-36m-x86_64-linux-gnu.so
71888 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_pcg64.cpython-36m-x86_64-linux-gnu.so
71911 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_mt19937.cpython-36m-x86_64-linux-gnu.so
71928 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_bit_generator.cpython-36m-x86_64-linux-gnu.so
71955 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_generator.cpython-36m-x86_64-linux-gnu.so
71987 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_bounded_integers.cpython-36m-x86_64-linux-gnu.so
72016 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/random/_common.cpython-36m-x86_64-linux-gnu.so
72047 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/fft/_pocketfft_internal.cpython-36m-x86_64-linux-gnu.so
72075 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/linalg/_umath_linalg.cpython-36m-x86_64-linux-gnu.so
72095 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/numpy/linalg/lapack_lite.cpython-36m-x86_64-linux-gnu.so
72115 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/bcrypt/_bcrypt.abi3.so
72152 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/nacl/_sodium.abi3.so
72189 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/_queue.cpython-36m-x86_64-linux-gnu.so
72221 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__imap.cpython-36m-x86_64-linux-gnu.so
72247 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__waiter.cpython-36m-x86_64-linux-gnu.so
72287 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/_local.cpython-36m-x86_64-linux-gnu.so
72316 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/_event.cpython-36m-x86_64-linux-gnu.so
72342 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__tracer.cpython-36m-x86_64-linux-gnu.so
72365 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/libev/_corecffi.abi3.so
72399 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/libuv/_corecffi.abi3.so
72428 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__abstract_linkable.cpython-36m-x86_64-linux-gnu.so
72459 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__hub_primitives.cpython-36m-x86_64-linux-gnu.so
72487 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__greenlet_primitives.cpython-36m-x86_64-linux-gnu.so
72520 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/_greenlet.cpython-36m-x86_64-linux-gnu.so
72548 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__hub_local.cpython-36m-x86_64-linux-gnu.so
72573 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__semaphore.cpython-36m-x86_64-linux-gnu.so
72598 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/libev/corecext.cpython-36m-x86_64-linux-gnu.so
72620 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/__ident.cpython-36m-x86_64-linux-gnu.so
72642 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/gevent/resolver/cares.cpython-36m-x86_64-linux-gnu.so
72672 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/sqlalchemy/cresultproxy.cpython-36m-x86_64-linux-gnu.so
72698 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/sqlalchemy/cutils.cpython-36m-x86_64-linux-gnu.so
72724 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/sqlalchemy/cprocessors.cpython-36m-x86_64-linux-gnu.so
72746 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_gdbm.cpython-36m-x86_64-linux-gnu.so
72771 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_dbm.cpython-36m-x86_64-linux-gnu.so
72791 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_heapq.cpython-36m-x86_64-linux-gnu.so
72811 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_multibytecodec.cpython-36m-x86_64-linux-gnu.so
72830 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_jp.cpython-36m-x86_64-linux-gnu.so
72849 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_kr.cpython-36m-x86_64-linux-gnu.so
72869 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_iso2022.cpython-36m-x86_64-linux-gnu.so
72888 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_cn.cpython-36m-x86_64-linux-gnu.so
72909 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_tw.cpython-36m-x86_64-linux-gnu.so
72939 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/_codecs_hk.cpython-36m-x86_64-linux-gnu.so
72965 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libz.so.1
72999 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libkrb5.so.3
73027 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libkeyutils.so.1
73055 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libssl.so.10
73085 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libk5crypto.so.3
73123 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libcrypto.so.10
73158 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libkrb5support.so.0
73179 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libpcre.so.1
73205 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libselinux.so.1
73229 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libgssapi_krb5.so.2
73250 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libcom_err.so.2
73279 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libexpat.so.1
73303 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libffi.so.6
73321 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/liblzma.so.5
73341 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libbz2.so.1
73362 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libreadline.so.6
73388 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libtinfo.so.5
73417 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libffi-806b1a9d.so.6.0.4
73442 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libsqlite3.so.0
73471 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libstdc++.so.6
73503 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libgcc_s.so.1
73527 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libncursesw.so.5
73549 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libgfortran-ed201abd.so.3.0.0
73690 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libopenblasp-r0-34a18dc3.3.7.so
73767 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libgdbm.so.4
73816 INFO: Executing - strip /root/.cache/pyinstaller/bincache10_py36_64bit/libgdbm_compat.so.4
86200 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
86247 INFO: Bootloader /usr/local/lib/python3.6/site-packages/PyInstaller/bootloader/Linux-64bit/run
86247 INFO: checking EXE
86247 INFO: Building EXE because EXE-00.toc is non existent
86247 INFO: Building EXE from EXE-00.toc
86248 INFO: Appending archive to ELF section in EXE ./XXX
86324 INFO: Building EXE from EXE-00.toc completed successfully.
Legorooj commented 4 years ago

No, what's the output when running the executable? Isn't that where the error is? @mirhmousavi

mirhmousavi commented 4 years ago
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 438, in get_code
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod02_archive.py", line 371, in extract
zlib.error: Error -3 while decompressing data: incorrect header check

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "src/entry.py", line 136, in invoke
  File "click/core.py", line 1137, in invoke
  File "click/core.py", line 1137, in invoke
  File "click/core.py", line 956, in invoke
  File "click/core.py", line 555, in invoke
  File "src/resources/modules/system/decorators.py", line 31, in func_wrapper
  File "click/decorators.py", line 17, in new_func
  File "src/commands/pool/__init__.py", line 118, in delete
  File "src/commands/pool/functions.py", line 39, in remove_pool
  File "src/resources/modules/XXX/decorators.py", line 15, in func_wrapper
  File "src/resources/modules/XXX/decorators.py", line 13, in func_wrapper
  File "src/resources/modules/XXX/__init__.py", line 254, in remove
  File "src/resources/modules/XXX/validators.py", line 183, in XXX
  File "src/resources/modules/XXX/validators.py", line 131, in validate_XXX
  File "src/core/cache/decorators.py", line 32, in memoized_func
  File "src/resources/modules/XXX/__init__.py", line 89, in XXX
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 607, in exec_module
  File "/usr/local/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 440,
ImportError: Loader FrozenImporter cannot handle module _strptime

Maybe temp files got delete or something?

Legorooj commented 4 years ago

Hmm - this is a --onefile/-F build isn't it? Are you leaving it running for a long time? Or does this occur on startup?

mirhmousavi commented 4 years ago

yes, one file, when the application starts it gives the user an interactive shell like click-contrib/click-repl and the user works with it for hours and yes it's a longrunning process. for example if you run fdisk /dev/sdX you get an interactive shell, our application is like that

Legorooj commented 4 years ago

See #4720. I think you'll find that there are known bugs when running from onefile mode with deletion of temporary files.

mirhmousavi commented 4 years ago

Change runtime_tmpdir to something other than /tmp in linux, solved the problem, thanks

in spec file

exe = EXE(
    ....
    runtime_tmpdir='/XXX',
    ....
)