"az container delete" fails due to 'ContainerGroupsOperations' object has no attribute 'delete'
See original GitHub issueDescribe the bug
Since docker image azure-cli:2.28.0
I get the following error when executing
az container delete --resource-group any-rg --name any-name
The same command works fine if it’s running with azure-cli:2.27.2
.
Command Name
az container delete
Errors:
The command failed with an unexpected error. Here is the traceback:
'ContainerGroupsOperations' object has no attribute 'delete'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/usr/local/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/usr/local/lib/python3.9/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/local/lib/python3.9/site-packages/azure/cli/command_modules/container/custom.py", line 66, in delete_container
return client.delete(resource_group_name, name)
AttributeError: 'ContainerGroupsOperations' object has no attribute 'delete'
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 container delete --resource-group {} --name {}
Expected Behavior
Environment Summary
Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with, Alpine Linux v3.14
Python 3.9.6
Installer: DOCKER
azure-cli 2.28.0
Additional Context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:17 (2 by maintainers)
Top Results From Across the Web
'ContainerGroupsOperations' object has no attribute 'delete ...
This is a known issue introduced by Microsoft updating Az CLI to version 2.28.0. There is no solution other that downgrade at the...
Read more >Delete image resources - Azure Container Registry
You can delete a tag with the Azure CLI command az acr repository untag. No space is freed when you untag an image...
Read more >Tweets with replies by Jacob Winn (@jacob_winn) / Twitter
The specific command we used was `az container delete --name {name} ... getting an error "'ContainerGroupsOperations' object has no attribute 'delete'".
Read more >az storage blob delete-batch command in Azure Devops
2020-09-19T08:50:53.1090868Z ##[error]'NoneType' object has no attribute 'findall'. Following is the inline script I am trying. az storage blob delete-batch ...
Read more >[Solved] Failed to delete Fields (XXX). Object dependencies ...
You will not find the deleted component from default solution also. Always prefer removing a component rather than deleting a solution. But if ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue will be fixed in version 2.29.0, which should be available by October 12th. You can find manual upgrade instructions here.
ADO AzureCLI task is locked into this latest version and causing issues elsewhere.