Describe the bug
When running (most?) AZ CLI commands, I'm getting the error detailed.
Related command
az group list
Errors
No module named 'azure.mgmt.resource.deploymentstacks'
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
self.commands_loader.load_arguments(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/__init__.py", line 44, in load_arguments
load_arguments(self, command)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/_params.py", line 15, in load_arguments
from azure.mgmt.resource.deploymentstacks.models import DenySettingsMode
ModuleNotFoundError: No module named 'azure.mgmt.resource.deploymentstacks'
Issue script & Debug output
cli.knack.cli: Command arguments: ['group', 'list', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x705f013751c0>, <function OutputProducer.on_global_arguments at 0x705f01158ea0>, <function CLIQuery.on_global_arguments at 0x705f01182fc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'group': ['azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: resource 0.080 52 232
cli.azure.cli.core: Total (1) 0.080 52 232
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 52 groups, 232 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : group list
cli.azure.cli.core: Command table: group list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x705f00104e00>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2025-06-27.12-36-12.group_list.1205.log'.
az_command_data_logger: command args: group list --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x705f0014dee0>]
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
self.commands_loader.load_arguments(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/__init__.py", line 44, in load_arguments
load_arguments(self, command)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/_params.py", line 15, in load_arguments
from azure.mgmt.resource.deploymentstacks.models import DenySettingsMode
ModuleNotFoundError: No module named 'azure.mgmt.resource.deploymentstacks'
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: No module named 'azure.mgmt.resource.deploymentstacks'
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
self.commands_loader.load_arguments(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/__init__.py", line 44, in load_arguments
load_arguments(self, command)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/_params.py", line 15, in load_arguments
from azure.mgmt.resource.deploymentstacks.models import DenySettingsMode
ModuleNotFoundError: No module named 'azure.mgmt.resource.deploymentstacks'
az_command_data_logger: No module named 'azure.mgmt.resource.deploymentstacks'
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 564, in execute
self.commands_loader.load_arguments(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/core/__init__.py", line 553, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/__init__.py", line 44, in load_arguments
load_arguments(self, command)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/azure/cli/command_modules/resource/_params.py", line 15, in load_arguments
from azure.mgmt.resource.deploymentstacks.models import DenySettingsMode
ModuleNotFoundError: No module named 'azure.mgmt.resource.deploymentstacks'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x705f00105080>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 0.240 seconds (init: 0.072, invoke: 0.168)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 8116 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.13 /usr/lib/python3.13/site-packages/azure/cli/telemetry/__init__.py /root/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The command to succeed without error
Environment Summary
azure-cli 2.74.0
core 2.74.0
telemetry 1.1.0
Extensions:
application-insights 1.2.3
azure-devops 1.0.2
containerapp 1.2.0b1
logic 1.1.0
Dependencies:
msal 1.32.3
azure-mgmt-resource 24.0.0
Python location '/usr/bin/python3.13'
Config directory '/root/.azure'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.13.5 (main, Jun 11 2025, 22:06:31) [GCC]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
Running openSUSE Tumbleweed 20250624 on WSL2
Describe the bug
When running (most?) AZ CLI commands, I'm getting the error detailed.
Related command
az group listErrors
Issue script & Debug output
Expected behavior
The command to succeed without error
Environment Summary
azure-cli 2.74.0
core 2.74.0
telemetry 1.1.0
Extensions:
application-insights 1.2.3
azure-devops 1.0.2
containerapp 1.2.0b1
logic 1.1.0
Dependencies:
msal 1.32.3
azure-mgmt-resource 24.0.0
Python location '/usr/bin/python3.13'
Config directory '/root/.azure'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.13.5 (main, Jun 11 2025, 22:06:31) [GCC]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
Running openSUSE Tumbleweed 20250624 on WSL2