v2rayL icon indicating copy to clipboard operation
v2rayL copied to clipboard

Failed to execute pyinstaller. TypeError: an integer is required (got type bytes)

Open siahuat0727 opened this issue 4 years ago • 4 comments

Ubuntu 20.04 Python 3.8

$ pyinstaller -F v2rayLui.py -p config.py -p sub2conf_api.py -p v2rayL_api.py -p v2rayL_threads.py -p utils.py -i images/logo.ico -n v2rayLui
43 INFO: PyInstaller: 3.5
43 INFO: Python: 3.8.2
54 INFO: Platform: Linux-5.4.0-28-generic-x86_64-with-glibc2.29
55 INFO: wrote /home/siahuat0727/git/v2rayL/v2rayL-GUI/v2rayLui.spec
56 INFO: UPX is not available.
57 INFO: Extending PYTHONPATH with paths
['/home/siahuat0727/git/v2rayL/v2rayL-GUI',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI/config.py',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI/sub2conf_api.py',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI/v2rayL_api.py',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI/v2rayL_threads.py',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI/utils.py',
 '/home/siahuat0727/git/v2rayL/v2rayL-GUI']
58 INFO: checking Analysis
78 INFO: checking PYZ
78 INFO: Building PYZ because PYZ-00.toc is non existent
78 INFO: Building PYZ (ZlibArchive) /home/siahuat0727/git/v2rayL/v2rayL-GUI/build/v2rayLui/PYZ-00.pyz
Traceback (most recent call last):
  File "/home/siahuat0727/.local/bin/pyinstaller", line 8, in <module>
    sys.exit(run())
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/home/siahuat0727/.local/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 "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build
    exec(code, spec_namespace)
  File "/home/siahuat0727/git/v2rayL/v2rayL-GUI/v2rayLui.spec", line 18, in <module>
    pyz = PYZ(a.pure, a.zipped_data,
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__
    self.__postinit__()
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble
    self.code_dict = {
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 652, in strip_paths_in_code
    consts = tuple(
  File "/home/siahuat0727/.local/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 653, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/home/siahuat0727/.local/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)

siahuat0727 avatar May 29 '20 01:05 siahuat0727

hhh遇见了一样的问题,请问您有解决吗?

WEIFZH avatar Jun 23 '20 02:06 WEIFZH

@WEIFZH 咳。。我后来用了这个 https://github.com/Qv2ray/Qv2ray

siahuat0727 avatar Jun 24 '20 07:06 siahuat0727

@WEIFZH 咳。。我后来用了这个 https://github.com/Qv2ray/Qv2ray

谢谢,我去试一试

WEIFZH avatar Jun 25 '20 06:06 WEIFZH

@WEIFZH 咳。。我后来用了这个 https://github.com/Qv2ray/Qv2ray

非常棒!谢谢,推荐大家!

KMFtcy avatar Sep 10 '20 08:09 KMFtcy