Astropy: Converting Py To Exe Error.

Created on 14 Dec 2019  路  3Comments  路  Source: astropy/astropy

Hi guys,

When I am trying to convert Py filet To Exe occurring an Error.

P.S. I have virtual env. pyinstaller, auto-py-to-exe. all pip requirements.

Can you please someone help me out?

An error occurred, traceback follows:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/auto_py_to_exe/__main__.py", line 269, in convert
    pyi.run() # Execute PyInstaller
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/var/folders/g2/mqw1y1hs20d9lkf7v_503hn80000gn/T/tmpxg9uqjo8/newtkkk.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__
    self.__postinit__()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble
    self.code_dict = {
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 660, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)

EDIT: Formatting

installation

All 3 comments

Is this related to #7052 ?

Is this related to #7052 ?

Hi, looks similar but different issue ;(

By using pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

it uninstalled the version 3.5 and installed the 4.0 dev version.

works

Was this page helpful?
0 / 5 - 0 ratings