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

Unknown commands in interactive mode display traceback #691

Open
andy-maier opened this issue Jan 5, 2025 · 0 comments
Open

Unknown commands in interactive mode display traceback #691

andy-maier opened this issue Jan 5, 2025 · 0 comments
Assignees
Milestone

Comments

@andy-maier
Copy link
Member

Example:
Type xxx as the command (note the trailing blank):

$ zhmc -n -h <host> -u <user>
Enter password (for user <user> at HMC <host>): 
Enter 'help' for help, <CTRL-D> or ':q' to exit.

Unhandled exception in event loop:
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/prompt_toolkit/buffer.py", line 1923, in new_coroutine
    await coroutine(*a, **kw)
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/prompt_toolkit/buffer.py", line 1740, in async_completer
    async for completion in async_generator:
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/prompt_toolkit/completion/base.py", line 310, in get_completions_async
    async for completion in completer.get_completions_async(
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/prompt_toolkit/completion/base.py", line 186, in get_completions_async
    for item in self.get_completions(document, complete_event):
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/click_repl/_completer.py", line 257, in get_completions
    self.parsed_ctx = _resolve_context(args, self.ctx)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/click_repl/utils.py", line 46, in _resolve_context
    name, cmd, args = command.resolve_command(ctx, args)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/click/core.py", line 1755, in resolve_command
    ctx.fail(_("No such command {name!r}.").format(name=original_cmd_name))
  File "/Users/maiera/virtualenvs/zhmccli312/lib/python3.12/site-packages/click/core.py", line 691, in fail
    raise UsageError(message, self)

Exception No such command 'xxx'.
Press ENTER to continue...
zhmc> xxx

@andy-maier andy-maier self-assigned this Jan 5, 2025
@andy-maier andy-maier added this to the 1.13.0 milestone Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant