mherrmann / fbs-tutorial

Tutorial for creating Python/Qt GUIs with fbs
https://build-system.fman.io
GNU General Public License v3.0
1.98k stars 159 forks source link

fbs freeze fails #20

Closed blurymind closed 5 years ago

blurymind commented 5 years ago

with this error:

(venv) E:\DEV\facecontroller\fbs-tutorial>fbs freeze
Traceback (most recent call last):
  File "E:\DEV\facecontroller\fbs-tutorial\venv\Scripts\pyinstaller-script.py", line 11, in <module>
    load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstaller')()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
    exec(text, spec_namespace)
  File "<string>", line 29, in <module>
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 424, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__
    self.__postinit__()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 273, in assemble
    pylib_name = os.path.basename(bindepend.get_python_library_path())
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\ntpath.py", line 214, in basename
    return split(p)[1]
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "E:\DEV\facecontroller\fbs-tutorial\venv\Scripts\fbs-script.py", line 11, in <module>
    load_entry_point('fbs==0.6.1', 'console_scripts', 'fbs')()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\cmdline.py", line 31, in main
    fn(*args)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\builtin_commands\__init__.py", line 113, in freeze
    freeze_windows(debug=debug)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows
    run_pyinstaller(args, debug)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\freeze\__init__.py", line 43, in run_pyinstaller
    run(args, check=True)
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'faceController', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'E:\\DEV\\facecontroller\\fbs-tutorial\\src\\main\\icons\\Icon.ico', '--distpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target', '--specpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target\\PyInstaller', '--workpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target\\PyInstaller', 'E:\\DEV\\facecontroller\\fbs-tutorial\\src\\main\\python\\main.py', '--runtime-hook', 'C:\\Users\\blury\\AppData\\Local\\Temp\\tmp5zr3d8w3\\fbs_pyinstaller_hook.py']' returned non-zero exit status 1.
mherrmann commented 5 years ago

It seems you are using Python 3.7. Does the problem also occur when you use Python 3.5 or 3.6?

From the README:

Python 3.7 is not yet supported and may not work.

mherrmann commented 5 years ago

I take it from your :+1: that Python 3.7 was the problem. Closing this issue.

HarshAtArkay commented 4 years ago

Hi, @mherrmann I am facing this error. Python 3.5.3 OS: macOS Mojave (101.4.6)


(venv) MacMinis-Mac-mini:build_trest macmini$ fbs freeze
----------------------------------------
Error running 'upx -V':
[Errno 20] Not a directory
----------------------------------------
Error: Executing command failed!
Traceback (most recent call last):
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/bin/fbs", line 11, in <module>
    load_entry_point('fbs==0.8.4', 'console_scripts', 'fbs')()
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/builtin_commands/__init__.py", line 114, in freeze
    freeze_mac(debug=debug)
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/freeze/mac.py", line 22, in freeze_mac
    run_pyinstaller(args, debug)
  File "/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/freeze/__init__.py", line 47, in run_pyinstaller
    run(args, check=True)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'Build_test', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/target/Icon.icns', '--distpath', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/target', '--specpath', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/target/PyInstaller', '--workpath', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/target/PyInstaller', '--additional-hooks-dir', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/venv/lib/python3.5/site-packages/fbs/freeze/hooks', '--runtime-hook', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/target/PyInstaller/fbs_pyinstaller_hook.py', '/Users/macmini/Documents/harsh/workspace/pyqt/build_trest/src/main/python/main.py']' returned non-zero exit status 1
mherrmann commented 4 years ago

Hi, sorry I don't know why that is. If you have a minimal example that reproduces the problem, please open a new issue with further details.