azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az resource tag fail on resource group with unexpected error

Open DanielHWe opened this issue 6 years ago • 2 comments

Describe the bug

I want to set tags on a resource group but it fails with an unexpected error. I call: az resource tag --tags "something=something" --ids ""

Command Name az resource tag

Errors:

'namespace'
Traceback (most recent call last):
Temp\pip-install-rtk110ve\knack\knack\cli.py, ln 206, in invoke
azure\cli\core\commands\__init__.py, ln 603, in execute
azure\cli\core\commands\__init__.py, ln 661, in _run_jobs_serially
azure\cli\core\commands\__init__.py, ln 654, in _run_job
Local\Temp\pip-install-rtk110ve\six\six.py, ln 693, in reraise
azure\cli\core\commands\__init__.py, ln 631, in _run_job
azure\cli\core\commands\__init__.py, ln 305, in __call__
azure-cli-core\azure\cli\core\__init__.py, ln 485, in default_command_handler
azure\cli\command_modules\resource\custom.py, ln 928, in tag_resource
azure\cli\command_modules\resource\custom.py, ln 928, in <listcomp>
azure\cli\command_modules\resource\custom.py, ln 802, in _get_rsrc_util_from_parsed_id
azure\cli\command_modules\resource\custom.py, ln 1802, in __init__
azure\cli\command_modules\resource\custom.py, ln 2005, in _resolve_api_version_by_id
KeyError: 'namespace'

To Reproduce:

call: az resource tag --tags "something=something" --ids ""

Expected Behavior

Environment Summary

Windows-10-10.0.17763-SP0
Python 3.6.6
Shell: powershell.exe

azure-cli 2.0.70 *

Extensions:
application-insights 0.1.1

Additional Context

DanielHWe avatar Nov 20 '20 10:11 DanielHWe

resource

yonzhan avatar Nov 21 '20 02:11 yonzhan

@DanielHWe This issue is resolved. if you are still facing this issue please upgrade to latest cli 2.38.0 and retry

RakeshMohanMSFT avatar Jul 19 '22 12:07 RakeshMohanMSFT