Azure-cli: Exception when running acr build

Created on 17 Dec 2020  路  5Comments  路  Source: Azure/azure-cli

This is autogenerated. Please review and update as needed.

Describe the bug

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

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • _Put any pre-requisite steps here..._
  • az acr build -t {} -n {} {}

Expected Behavior

Environment Summary

Linux-5.4.0-52-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.12.0 *

Additional Context


Core Error Handling Service Attention

All 5 comments

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

This is autogenerated. Please review and update as needed.

Describe the bug

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

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • _Put any pre-requisite steps here..._
  • az acr build -t {} -n {} {}

Expected Behavior

Environment Summary

Linux-5.4.0-52-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.12.0 *

Additional Context


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.

Was this page helpful?
0 / 5 - 0 ratings