python-eel/Eel

PyInstaller Eel : TypeError: an integer is required (got type bytes)

Open

#246 opened on Feb 23, 2020

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Python (570 forks)batch import
help wanted

Repository metrics

Stars
 (5,980 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I am getting this error when I try to build (package) my Eel program using pyinstaller. Please help me I am using Python 3.8.1

C:\Users\admin\Desktop\project>python -m eel script.py web
Building executable with main script 'script.py' and web folder 'web'...

Running:
pyinstaller script.py --hidden-import bottle_websocket --add-data C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\eel\eel.js;eel --add-data web;web

603 INFO: PyInstaller: 3.5
604 INFO: Python: 3.8.1
605 INFO: Platform: Windows-10-10.0.18362-SP0
607 INFO: wrote C:\Users\admin\Desktop\project\script.spec
611 INFO: UPX is not available.
614 INFO: Extending PYTHONPATH with paths
['C:\\Users\\admin\\Desktop\\project',
 'C:\\Users\\admin\\Desktop\\project']
614 INFO: checking Analysis
877 INFO: Appending 'datas' from .spec
882 INFO: checking PYZ
883 INFO: Building PYZ because PYZ-00.toc is non existent
883 INFO: Building PYZ (ZlibArchive) C:\Users\admin\Desktop\project\build\script\PYZ-00.pyz
Traceback (most recent call last):
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\eel\__main__.py", line 24, in <module>
    pyi.run(full_args)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "C:\Users\admin\Desktop\project\script.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
    self.__postinit__()
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
    self.code_dict = {
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\lib\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)

Contributor guide