Package: azure-cli
Version: 2.18.0-2
Severity: important

When trying to use any az network commands, an error is thrown and the command
fails. For example, "az network dns zone list" gives this output:

CLIInternalError: The command failed with an unexpected error. Here is the
traceback:
cannot import name 'BatchManagementClient' from 'azure.mgmt.batch'
(/usr/lib/python3/dist-packages/azure/mgmt/batch/__init__.py)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py",
line 558, in execute
    self.commands_loader.load_arguments(command)
  File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 481,
in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument
registries
  File "/usr/lib/python3/dist-
packages/azure/cli/command_modules/network/__init__.py", line 39, in
load_arguments
    load_arguments(self, command)
  File "/usr/lib/python3/dist-
packages/azure/cli/command_modules/network/_params.py", line 2000, in
load_arguments
    from
azure.cli.command_modules.network.private_link_resource_and_endpoint_connections.custom
import TYPE_CLIENT_MAPPING, register_providers
  File "/usr/lib/python3/dist-
packages/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/custom.py",
line 9, in <module>
    from .resource_providers.batch_provider import BatchPrivateEndpointClient
  File "/usr/lib/python3/dist-
packages/azure/cli/command_modules/network/private_link_resource_and_endpoint_connections/resource_providers/batch_provider.py",
line 6, in <module>
    from azure.mgmt.batch import BatchManagementClient
ImportError: cannot import name 'BatchManagementClient' from 'azure.mgmt.batch'
(/usr/lib/python3/dist-packages/azure/mgmt/batch/__init__.py)
To open an issue, please run: 'az feedback'

-- System Information:
Debian Release: 11.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8),
LANGUAGE=en_CA:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages azure-cli depends on:
ii  python3            3.9.2-3
ii  python3-azure-cli  2.18.0-2

azure-cli recommends no packages.

azure-cli suggests no packages.

Reply via email to