az cli on Windows cannot run any commands

Craig Nicol 1 Reputation point
2022-04-28T15:02:42.21+00:00

Using this az cli version :

azure-cli 2.33.0 *

core 2.33.0 *
telemetry 1.0.6

Extensions:
application-insights 0.1.14
arcdata Unknown

msal 1.16.0
azure-mgmt-resource 20.0.0

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\craig.nicol.azure\cliextensions'

Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

You have 2 updates available. Consider updating your CLI installation with 'az upgrade'


Whenever I try to run a command (such as "az upgrade" or "az feedback") I get the following error:

The command failed with an unexpected error. Here is the traceback:
Expected 1 module to load starting with 'azext_': got []
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 512, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 434, in load_command_table
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 328, in _update_command_table_from_extensions
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 315, in _filter_modname
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/extension/init.py", line 308, in get_extension_modnameAssertionError: Expected 1 module to load starting with 'azext_': got []
To open an issue, please run: 'az feedback'


How can I get this working again on windows?

Azure SQL Database
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
322 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Craig Nicol 1 Reputation point
    2022-05-02T08:22:00.223+00:00

    I think it was an extension I installed, but I can't remember which one. I wonder if it's arcdara as the metadata for that one appears to be missing.

    0 comments No comments

  2. Craig Nicol 1 Reputation point
    2022-05-02T17:10:15.083+00:00

    I think it started failing after I installed Azure Data Studio, and that told me that az CLI was not installed and offered to install it for me. And it's been prompting me to install is on startup ever since, even though I keep telling it to install it.


  3. Luis Martins - Docspider Software 41 Reputation points
    2022-11-18T18:21:02.56+00:00

    Good Evening!

    I just opened my app lens and ran the kubectl get nodes command and the problem was solved.

    0 comments No comments