question

CraigNicol-9899 avatar image
0 Votes"
CraigNicol-9899 asked LuisMartinsDocspiderSoftware-3338 answered

az cli on Windows cannot run any commands

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-databasedotnet-cli
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@CraigNicol-9899 - Thank you for reaching out to us.

We managed to upgrade azure-cli from 2.33 to 2.36 using az upgrade and can't reproduce this issue. Could you please provide more information on which command broke az, thank you.

0 Votes 0 ·
CraigNicol-9899 avatar image
0 Votes"
CraigNicol-9899 answered CraigNicol-9899 published

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CraigNicol-9899 avatar image
0 Votes"
CraigNicol-9899 answered Monalla-MSFT commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@CraigNicol-9899 - Since the issue started after installing azure data studio, I am redirecting this issue to the appropriate team so they can provide more insights on this issue.

Thank you for your patience and cooperation on this.

0 Votes 0 ·
LuisMartinsDocspiderSoftware-3338 avatar image
0 Votes"
LuisMartinsDocspiderSoftware-3338 answered

Good Evening!

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.