Skip to content

az backup container unregister - 'NoneType' object has no attribute 'name' #32571

@sc-draymond

Description

@sc-draymond

Describe the bug

Running the "az backup container unregister" command in a PowerShell script results in an error with a non-existent path.

Related command

az backup container unregister

Errors

The command failed with an unexpected error. Here is the traceback:
'NoneType' object has no attribute 'name'
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/_exception_handler.py", line 11, in backup_exception_handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/backup/custom_base.py", line 374, in unregister_container
AttributeError: 'NoneType' object has no attribute 'name'

Issue script & Debug output

az backup container unregister --backup-management-type AzureIaasVM --container-name "MyFriendlyName" --resource-group "MyResourceGroup" --subscription "MySubscriptionID" --vault-name "MyVaultName" --yes

Expected behavior

The container is unregistered

Environment Summary

Windows-11-10.0.26200-SP0
Python 3.13.9
Installer: MSI

azure-cli 2.81.0

Extensions:
bastion 1.4.2
serviceconnector-passwordless 3.3.6
ssh 2.0.6

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botRecovery Services Backupaz backupService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions