Skip to content
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

Bad commands throw stacktrace #16

Open
petermr opened this issue Nov 23, 2022 · 0 comments
Open

Bad commands throw stacktrace #16

petermr opened this issue Nov 23, 2022 · 0 comments

Comments

@petermr
Copy link
Owner

petermr commented Nov 23, 2022

Avoid stacktrace such as:

(base) pm286macbook:pyami pm286$ py4ami - h
usage: py4ami [-h] [--version] {DICT,GUI,HTML,PDF,PROJECT} ...
py4ami: error: argument command: invalid choice: '-' (choose from 'DICT', 'GUI', 'HTML', 'PDF', 'PROJECT')
Traceback (most recent call last):
  File "/opt/anaconda3/bin/py4ami", line 8, in <module>
    sys.exit(main())
  File "/opt/anaconda3/lib/python3.8/site-packages/py4ami/pyamix.py", line 1253, in main
    pyamix.run_command(sys.argv[1:])
  File "/opt/anaconda3/lib/python3.8/site-packages/py4ami/pyamix.py", line 342, in run_command
    self.parse_and_run_args(args)
  File "/opt/anaconda3/lib/python3.8/site-packages/py4ami/pyamix.py", line 357, in parse_and_run_args
    self.args = self.make_substitutions_create_arg_tuples(arglist, parser)
  File "/opt/anaconda3/lib/python3.8/site-packages/py4ami/pyamix.py", line 533, in make_substitutions_create_arg_tuples
    raise ValueError(f"bad command arguments {parsed_args} (see log output)")
ValueError: bad command arguments SystemExitFail_2 (see log output)
(base) pm286macbook:pyami pm286$ 

Make this prettier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant