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

Missing arguments to vctl prints a traceback. #184

Open
davidraker opened this issue Nov 30, 2023 · 0 comments
Open

Missing arguments to vctl prints a traceback. #184

davidraker opened this issue Nov 30, 2023 · 0 comments

Comments

@davidraker
Copy link
Contributor

Calling vctl start without arguments gives a traceback:

(eptron) [dmr@WE44739 Scratch]$ vctl start Traceback (most recent call last): File "/home/dmr/Scratch/eptron/bin/vctl", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/dmr/Scratch/eptron/lib64/python3.11/site-packages/volttron/client/commands/control.py", line 3028, in main return opts.func(opts) ^^^^^^^^^^^^^^^ File "/home/dmr/Scratch/eptron/lib64/python3.11/site-packages/volttron/client/commands/control.py", line 752, in start_agent act_on_agent("start_agent", opts) File "/home/dmr/Scratch/eptron/lib64/python3.11/site-packages/volttron/client/commands/control.py", line 777, in act_on_agent raise ValueError("Missing argument. Command requires at least one argument.") ValueError: Missing argument. Command requires at least one argument.

To Reproduce
Steps to reproduce the behavior:

  1. type "vctl start" then press enter

Expected behavior
Any vctl commands / subcommands should print usage information, possibly with a helpful error message rather than a traceback.
For the case of vctl start, for example, usage information (i.e., the output of "vctl start --help") is:

``
usage: vctl command [OPTIONS] ... start [-h] [--name] [--tag] [--all-tagged] [--uuid] [-c FILE] [--debug] [-t SECS] [--msgdebug MSGDEBUG] [--vip-address ZMQADDR]
[pattern ...]

positional arguments:
pattern UUID or name of agent

options:
-h, --help show this help message and exit
--name filter/search by agent name. value passed should be quoted if it contains a regular expression
--tag filter/search by tag name. value passed should be quoted if it contains a regular expression
--all-tagged filter/search by all tagged agents
--uuid filter/search by UUID (default). value passed should be quoted if it contains a regular expression
-c FILE, --config FILE
read configuration from FILE
--debug show tracebacks for errors rather than a brief message
-t SECS, --timeout SECS
timeout in seconds for remote calls (default: 60)
--msgdebug MSGDEBUG route all messages to an agent while debugging
--vip-address ZMQADDR
ZeroMQ URL to bind for VIP connections
``

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