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

Closed
ase1590 opened this Issue Jun 19, 2018 · 2 comments

Comments

Projects
None yet
5 participants
@ase1590

ase1590 commented Jun 19, 2018

System: Arch Linux
python: 3.6.5
Pyinstaller: develop

pyinstaller -h
results in an AssertionError.

output:

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/__main__.py", line 92, in run
    args = parser.parse_args(pyi_args)
  File "/usr/lib/python3.6/argparse.py", line 1730, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python3.6/argparse.py", line 1762, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.6/argparse.py", line 1968, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/usr/lib/python3.6/argparse.py", line 1908, in consume_optional
    take_action(action, args, option_string)
  File "/usr/lib/python3.6/argparse.py", line 1836, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/lib/python3.6/argparse.py", line 1020, in __call__
    parser.print_help()
  File "/usr/lib/python3.6/argparse.py", line 2362, in print_help
    self._print_message(self.format_help(), file)
  File "/usr/lib/python3.6/argparse.py", line 2346, in format_help
    return formatter.format_help()
  File "/usr/lib/python3.6/argparse.py", line 282, in format_help
    help = self._root_section.format_help()
  File "/usr/lib/python3.6/argparse.py", line 213, in format_help
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/lib/python3.6/argparse.py", line 213, in <listcomp>
    item_help = join([func(*args) for func, args in self.items])
  File "/usr/lib/python3.6/argparse.py", line 333, in _format_usage
    assert ' '.join(opt_parts) == opt_usage
AssertionError
@tallforasmurf

This comment has been minimized.

Contributor

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.

@hamptus

This comment has been minimized.

Contributor

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