-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
When I run either any of the following commands I get a similar error on the response. This was working until recently. At first I thought it was Device Guard but that line no longer is the response. The response is simply any issue with line 233.
Related command
- az -- version
- az ssh vm --name vmblahblah --resource-group rg-blahblah --prefer-private-ip
- az ssh vm --n vm2ndblah -g rg-2ndblah --prefer-private-ip
Errors
- The command failed with an unexpected error. Here is the traceback:
''
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 624, in execute
KeyError: ''
2
The command failed with an unexpected error. Here is the traceback:
''
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/commands/init.py", line 564, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 526, in execute in load_arguments
etc
etc (this was from a screenshot sorry)
Issue script & Debug output
- PS C:\Windows\System32> az -- version --debug
cli.knack.cli: Command arguments: ['--', 'version', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0000016DCE98B2E0>, <function OutputProducer.on_global_arguments at 0x0000016DCED2C180>, <function CLIQuery.on_global_arguments at 0x0000016DCED51580>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: No module found from index for '['--', 'version', '--debug']'
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'computefleet', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acr 0.559 36 149
cli.azure.cli.core: acs 0.027 15 79
cli.azure.cli.core: advisor 0.003 3 6
cli.azure.cli.core: ams 0.005 22 100
cli.azure.cli.core: apim 0.008 14 69
cli.azure.cli.core: appconfig 0.003 9 47
cli.azure.cli.core: appservice 0.030 80 277
cli.azure.cli.core: aro 0.015 1 10
cli.azure.cli.core: backup 0.004 16 60
cli.azure.cli.core: batch 0.047 32 96
cli.azure.cli.core: batchai 0.003 10 30
cli.azure.cli.core: billing 0.018 19 53
cli.azure.cli.core: botservice 0.003 12 42
cli.azure.cli.core: cdn 0.175 8 50
cli.azure.cli.core: cloud 0.003 1 7
cli.azure.cli.core: cognitiveservices 0.003 10 33
cli.azure.cli.core: compute_recommender 0.004 1 1
cli.azure.cli.core: computefleet 0.010 1 1
cli.azure.cli.core: config 0.002 2 7
cli.azure.cli.core: configure 0.002 2 5
cli.azure.cli.core: consumption 0.023 8 9
cli.azure.cli.core: container 0.016 2 17
cli.azure.cli.core: containerapp 0.160 37 123
cli.azure.cli.core: cosmosdb 0.018 58 200
cli.azure.cli.core: databoxedge 0.013 5 28
cli.azure.cli.core: dls 0.003 6 36
cli.azure.cli.core: dms 0.002 3 22
cli.azure.cli.core: eventgrid 0.005 25 96
cli.azure.cli.core: eventhubs 0.021 14 21
cli.azure.cli.core: extension 0.001 1 7
cli.azure.cli.core: feedback 0.001 1 2
cli.azure.cli.core: find 0.001 1 1
cli.azure.cli.core: hdinsight 0.012 9 42
cli.azure.cli.core: identity 0.011 2 7
cli.azure.cli.core: interactive 0.001 1 1
cli.azure.cli.core: iot 0.104 19 82
cli.azure.cli.core: keyvault 0.028 20 114
cli.azure.cli.core: lab 0.043 9 30
cli.azure.cli.core: managedservices 0.013 3 8
cli.azure.cli.core: maps 0.003 5 13
cli.azure.cli.core: marketplaceordering 0.006 1 2
cli.azure.cli.core: monitor 0.268 18 64
cli.azure.cli.core: mysql 0.131 16 56
cli.azure.cli.core: netappfiles 0.055 8 15
cli.azure.cli.core: network 0.076 106 352
cli.azure.cli.core: policyinsights 0.015 9 17
cli.azure.cli.core: privatedns 0.027 14 60
cli.azure.cli.core: profile 0.002 2 8
cli.azure.cli.core: rdbms 0.098 52 217
cli.azure.cli.core: redis 0.003 7 38
cli.azure.cli.core: relay 0.032 7 8
cli.azure.cli.core: resource 0.019 52 232
cli.azure.cli.core: role 0.003 17 62
cli.azure.cli.core: search 0.011 7 19
cli.azure.cli.core: security 0.014 48 98
cli.azure.cli.core: servicebus 0.014 13 17
cli.azure.cli.core: serviceconnector 0.087 20 331
cli.azure.cli.core: servicefabric 0.026 27 80
cli.azure.cli.core: signalr 0.004 10 42
cli.azure.cli.core: sql 0.026 56 215
cli.azure.cli.core: sqlvm 0.032 4 20
cli.azure.cli.core: storage 0.098 60 275
cli.azure.cli.core: synapse 0.010 54 246
cli.azure.cli.core: util 0.002 3 7
cli.azure.cli.core: vm 0.076 59 262
cli.azure.cli.core: Total (65) 2.541 1193 4724
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ssh 0.023 1 4 C:\Users\user.azure\cliextensions\ssh
cli.azure.cli.core: Total (1) 0.023 1 4
cli.azure.cli.core: Loaded 1180 groups, 4728 commands.
cli.azure.cli.core: Updated command index in 0.005 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0000016DD1026E80>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\Username.azure\commands\2025-07-10.14-13-22.unknown_command.15816.log'.
az_command_data_logger: command args: -- {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x0000016DD104F740>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x0000016DD1081F80>, <function register_cache_arguments..add_cache_arguments at 0x0000016DD10820C0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x0000016DD1082160>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x0000016DD4242C00>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0000016DCED2C220>, <function CLIQuery.handle_query_parameter at 0x0000016DCED51620>, <function register_ids_argument..parse_ids_arguments at 0x0000016DD1082020>]
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 624, in execute
KeyError: ''
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: ''
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 624, in execute
KeyError: ''
az_command_data_logger: ''
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 624, in execute
KeyError: ''
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 0x0000016DD1027100>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 3.171 seconds (init: 0.430, invoke: 2.741)
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 7353 in cache file under C:\Users\User.azure\telemetry\20250710141322443
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\User.azure C:\Users\User.azure\telemetry\20250710141322443"
telemetry.process: Return from creating process 8260
telemetry.main: Finish creating telemetry upload process.
Expected behavior
On any of these commands I used to expect to see the expected output
- would show the current version
- would connect to the VM over private ip
- would do the same as above.
Environment Summary
I cant provide this as per my error output 1. However I know I have 2.75.0 with SSH version "C:\Users\User.azure\cliextensions\ssh\ssh-2.0.6.dist-info" and "C:\Users\User.azure\cliextensions\ssh\ssh-2.0.6-py3-none-any.whl"
Additional context
Device Guard is enforced but 2.0.6 was added as a in production supplemental. This error is occurring before and after this test is in place.