No module named 'azure.mgmt.containerservice.v2019_08_01'
I am getting an error while working with Azure CLI az. I am using azure version of 2.0.80. and I am using CentOS 7. When I run az command az aks update i am getting error like
The command failed with an unexpected error. Here is the traceback:
No module named 'azure.mgmt.containerservice.v2019_08_01'
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 554, in execute
parsed_args = self.parser.parse_args(args)
File "/usr/lib64/az/lib/python3.6/site-packages/knack/parser.py", line 259, in parse_args
return super(CLICommandParser, self).parse_args(args)
File "/usr/lib64/python3.6/argparse.py", line 1734, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1766, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1954, in _parse_known_args
positionals_end_index = consume_positionals(start_index)
File "/usr/lib64/python3.6/argparse.py", line 1931, in consume_positionals
take_action(action, args)
File "/usr/lib64/python3.6/argparse.py", line 1840, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib64/python3.6/argparse.py", line 1137, in __call__
subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
File "/usr/lib64/python3.6/argparse.py", line 1766, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1972, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib64/python3.6/argparse.py", line 1912, in consume_optional
take_action(action, args, option_string)
File "/usr/lib64/python3.6/argparse.py", line 1840, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib64/python3.6/argparse.py", line 1024, in __call__
parser.print_help()
File "/usr/lib64/python3.6/argparse.py", line 2366, in print_help
self._print_message(self.format_help(), file)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/parser.py", line 157, in format_help
super(AzCliCommandParser, self).format_help()
File "/usr/lib64/az/lib/python3.6/site-packages/knack/parser.py", line 249, in format_help
is_group)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/_help.py", line 153, in show_help
super(AzCliHelp, self).show_help(cli_name, nouns, parser, is_group)
File "/usr/lib64/az/lib/python3.6/site-packages/knack/help.py", line 691, in show_help
else self.group_help_cls(self, delimiters, parser)
File "/usr/lib64/az/lib/python3.6/site-packages/knack/help.py", line 232, in __init__
child.load(options)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/_help.py", line 244, in load
loader.versioned_load(self, options)
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/_help_loaders.py", line 153, in versioned_load
super(CliHelpFile, help_obj).load(parser) # pylint:disable=bad-super-call
File "/usr/lib64/az/lib/python3.6/site-packages/knack/help.py", line 177, in load
description = getattr(options, 'description', None)
File "/usr/lib64/az/lib/python3.6/site-packages/knack/parser.py", line 240, in __getattribute__
if callable(self._description) else self._description
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 502, in default_description_loader
op = handler or self.get_op_handler(operation, operation_group=kwargs.get('operation_group'))
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 536, in get_op_handler
op = import_module(mod_to_import)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 29, in <module>
from ._helpers import _populate_api_server_access_profile, _set_load_balancer_sku, _set_vm_set_type
File "/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/_helpers.py", line 8, in <module>
from azure.mgmt.containerservice.v2019_08_01.models import ManagedClusterAPIServerAccessProfile
ModuleNotFoundError: No module named 'azure.mgmt.containerservice.v2019_08_01'
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm
I am also hitting the same issue when trying to use az aks update
Hi Jennifer @Jen7714, could you take a look at this issue please?
Hello! Please try again with the latest Azure CLI version. Feel free to reopen an issue if it still doesn't work.
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
Have almost identical issue. Azure CLI 2.14.2 delivered via Microsoft App-V.
C:\Windows\System32>az aks get-credentials --resource-group rpu-nprod-h3-aks-rg-01 --name h3-ext-nprod-sen-aks --debug
Command arguments: ['aks', 'get-credentials', '--resource-group', 'rpu-nprod-h3-aks-rg-01', '--name', 'h3-ext-nprod-sen-aks', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03095978>, <function OutputProducer.on_global_arguments at 0x03126DF8>, <function CLIQuery.on_global_arguments at 0x0314DDF8>]
Event: CommandInvoker.OnPreCommandTableCreate []
Modules found from index for 'aks': ['azure.cli.command_modules.acs']
Loading command modules:
Name Load Time Groups Commands
acs 0.136 7 48
Total (1) 0.136 7 48
Loaded 7 groups, 48 commands.
Found a match in the command table.
Raw command : aks get-credentials
Command table: aks get-credentials
Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0374ACD8>]
az_command_data_logger : command args: aks get-credentials --resource-group {} --name {} --debug
metadata file logging enabled - writing logs to 'C:\Users\ISYCHEKZ.azure\commands'.
Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.
cli.azure.cli.core.azclierror : CLIInternalError: The command failed with an unexpected error. Here is the traceback:
CLIInternalError: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror : No module named 'azure.mgmt.containerservice.v2020_09_01.operations.resolve_private_link_service_id_operations'
Traceback (most recent call last):
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-o2uit6zy\knack\cli.py", line 215, in invoke
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-mdyrq85s\azure\cli\core\commands_init.py", line 553, in execute
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-mdyrq85s\azure\cli\core_init_.py", line 478, in load_arguments
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-mdyrq85s\azure\cli\core\commands_init_.py", line 310, in load_arguments
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-o2uit6zy\knack\commands.py", line 106, in load_arguments
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-mdyrq85s\azure\cli\core_init_.py", line 787, in default_arguments_loader
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-unpacked-wheel-mdyrq85s\azure\cli\core_init_.py", line 827, in get_op_handler
File "importlib_init_.py", line 126, in import_module
File "