Command Name
az acr build
Errors:
list index out of range
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 579, in execute
parsed_args = self.parser.parse_args(args)
python3.6/site-packages/knack/parser.py, ln 262, in parse_args
return super(CLICommandParser, self).parse_args(args)
az/lib/python3.6/argparse.py, ln 1734, in parse_args
args, argv = self.parse_known_args(args, namespace)
...
azure/cli/core/command_recommender.py, ln 61, in __init__
self.parameters = self._normalize_parameters(parameters)
azure/cli/core/command_recommender.py, ln 244, in _normalize_parameters
standard_form = sorted_options[0]
IndexError: list index out of range
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az acr build -t {} -n {} {}Linux-5.4.0-52-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB
azure-cli 2.12.0 *
Sorry, might have mistyped, I used -t <registry name>, but when i changed it to --registry <registry name> it worked.
Maybe a better error message would be nice though+
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-MSFT.
Issue Details
Command Name
az acr build
Errors:
list index out of range
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 579, in execute
parsed_args = self.parser.parse_args(args)
python3.6/site-packages/knack/parser.py, ln 262, in parse_args
return super(CLICommandParser, self).parse_args(args)
az/lib/python3.6/argparse.py, ln 1734, in parse_args
args, argv = self.parse_known_args(args, namespace)
...
azure/cli/core/command_recommender.py, ln 61, in __init__
self.parameters = self._normalize_parameters(parameters)
azure/cli/core/command_recommender.py, ln 244, in _normalize_parameters
standard_form = sorted_options[0]
IndexError: list index out of range
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az acr build -t {} -n {} {}Linux-5.4.0-52-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB
azure-cli 2.12.0 *
| Author: | Peder2911 |
|---|---|
| Assignees: | - |
| Labels: | `Container Registry`, `Service Attention` |
| Milestone: | - |
route to service team.
Can core team take a look first? The error is from the generic argument parsing layer
@houk-ms @yungezz
This is a known issue resulting from improper handling of positional arguments whilst normalizing parameters for failure recovery recommendations. Newer versions of CLI will no longer have this issue.