question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"az container delete" fails due to 'ContainerGroupsOperations' object has no attribute 'delete'

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:8
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
macolsocommented, Oct 7, 2021

This issue will be fixed in version 2.29.0, which should be available by October 12th. You can find manual upgrade instructions here.

5reactions
jhwj9617commented, Sep 9, 2021

ADO AzureCLI task is locked into this latest version and causing issues elsewhere.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found