Skip to content

Gooey's defaults build-osx.spec causes exception in pyinstaller #930

@simonsbench

Description

@simonsbench

The build-osx.spec included in the project generates a runtime exception in pyinstaller.

The spec is linked here: https://github.com/chriskiehl/Gooey/blob/master/docs/packaging/build-osx.spec

The traceback is here:

Traceback (most recent call last):
  File "gooey_examples/bin/pyinstaller", line 8, in <module>
    sys.exit(_console_script_run())
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/__main__.py", line 231, in _console_script_run
    run()
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/__main__.py", line 215, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/__main__.py", line 70, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/build_main.py", line 1270, in main
    build(specfile, distpath, workpath, clean_build)
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/build_main.py", line 1208, in build
    exec(code, spec_namespace)
  File "build-osx.spec", line 35, in <module>
    exe = EXE(pyz,
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/api.py", line 646, in __init__
    self.pkg = PKG(
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/api.py", line 254, in __init__
    self.__postinit__()
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/datastruct.py", line 184, in __postinit__
    self.assemble()
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/api.py", line 314, in assemble
    src_name = process_collected_binary(
  File "gooey_examples/lib/python3.9/site-packages/PyInstaller/building/utils.py", line 179, in process_collected_binary
    f'bincache{use_strip:d}{use_upx:d}{pyver}{arch}',
TypeError: unsupported format string passed to NoneType.__format__

This is using the gooey examples repository, with the only modification being the Analysis entry python file as "'examples/simple_demo.py"

I followed the stacktrace, to realize that the strip option needs to be true, false, or unset. Setting it to None breaks its use of the f string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions