New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyinstaller -h is broken #3585

ase1590 opened this Issue Jun 19, 2018 · 2 comments


None yet
5 participants

ase1590 commented Jun 19, 2018

System: Arch Linux
python: 3.6.5
Pyinstaller: develop

pyinstaller -h
results in an AssertionError.


Traceback (most recent call last):
  File "/usr/bin/pyinstaller", line 11, in <module>
    load_entry_point('PyInstaller==3.4.dev0+g2aa0a333', 'console_scripts', 'pyinstaller')()
  File "/usr/lib/python3.6/site-packages/PyInstaller/", line 92, in run
    args = parser.parse_args(pyi_args)
  File "/usr/lib/python3.6/", line 1730, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python3.6/", line 1762, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.6/", line 1968, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python3.6/", line 1908, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python3.6/", line 1836, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/lib/python3.6/", line 1020, in __call__
  File "/usr/lib/python3.6/", line 2362, in print_help
    self._print_message(self.format_help(), file)
  File "/usr/lib/python3.6/", line 2346, in format_help
    return formatter.format_help()
  File "/usr/lib/python3.6/", line 282, in format_help
    help = self._root_section.format_help()
  File "/usr/lib/python3.6/", line 213, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/lib/python3.6/", line 213, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/lib/python3.6/", line 333, in _format_usage
    assert ' '.join(opt_parts) == opt_usage

This comment has been minimized.


tallforasmurf commented Jun 19, 2018

confirm on MacOS, any invalid/unknown option does this. As shown, main calls argparse, argparse gets into trouble trying to compose a usage message.


This comment has been minimized.


hamptus commented Jun 20, 2018

Fixed in #3587

@bjones1 bjones1 closed this Jun 21, 2018

@htgoebel htgoebel added this to the PyInstaller 3.4 milestone Sep 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment