Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az keyvault secret list command throwing error #28048

Closed
dheerajjain11 opened this issue Dec 16, 2023 · 3 comments
Closed

az keyvault secret list command throwing error #28048

dheerajjain11 opened this issue Dec 16, 2023 · 3 comments
Assignees
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault az keyvault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue
Milestone

Comments

@dheerajjain11
Copy link

Describe the bug

az keyvault secret list command throwing error. Here is the error message:

No module named 'azure.keyvault.v7_0'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/init.py", line 528, in execute
self.commands_loader.load_arguments(command)
File "/usr/lib/python3/dist-packages/azure/cli/core/init.py", line 299, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/init.py", line 291, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/lib/python3/dist-packages/knack/commands.py", line 97, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/keyvault/_command_type.py", line 71, in keyvault_arguments_loader
op = get_op_handler()
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/keyvault/_command_type.py", line 68, in get_op_handler
return self.command_loader.get_op_handler(operations_tmpl.format(method_name))
File "/usr/lib/python3/dist-packages/azure/cli/core/init.py", line 536, in get_op_handler
op = import_module(mod_to_import)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.keyvault.v7_0'

Related command

az keyvault secret

Errors

The command failed with an unexpected error. Here is the traceback:

Issue script & Debug output

No module named 'azure.keyvault.v7_0'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/init.py", line 528, in execute
self.commands_loader.load_arguments(command)
File "/usr/lib/python3/dist-packages/azure/cli/core/init.py", line 299, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/init.py", line 291, in load_arguments
super(AzCliCommand, self).load_arguments()
File "/usr/lib/python3/dist-packages/knack/commands.py", line 97, in load_arguments
cmd_args = self.arguments_loader()
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/keyvault/_command_type.py", line 71, in keyvault_arguments_loader
op = get_op_handler()
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/keyvault/_command_type.py", line 68, in get_op_handler
return self.command_loader.get_op_handler(operations_tmpl.format(method_name))
File "/usr/lib/python3/dist-packages/azure/cli/core/init.py", line 536, in get_op_handler
op = import_module(mod_to_import)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.keyvault.v7_0'

Expected behavior

Command should return list of secrets

Environment Summary

azure-cli 2.0.81

core 2.0.81
telemetry 1.0.4

Extensions:
azure-devops 0.17.0

Python location '/usr/bin/python3'
Extensions directory '/home/azureuser/.azure/cliextensions'

Python (Linux) 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0]

Additional context

No response

@dheerajjain11 dheerajjain11 added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Dec 16, 2023
Copy link

Hi @dheerajjain11,

This is not the official Azure CLI published by Microsoft.

How to tell if the installed Azure CLI is unofficial:

Please follow https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux to install Microsoft official Azure CLI.

If you feel that further discussion is needed, please add a comment with the text /clibot unresolve to reopen the issue.

Copy link

Hi @dheerajjain11
Find similar issue #19640.

Issue title Unofficial Azure CLI deb packages are distributed by Linux repositories
Create time 2021-09-22
Comment number 9

Please confirm if this resolves your issue.

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot labels Dec 16, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 16, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 16, 2023

Thank you for opening this issue, we will look into it.

@yonzhan yonzhan added this to the Backlog milestone Dec 17, 2023
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault az keyvault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue
Projects
None yet
Development

No branches or pull requests

3 participants