question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Az Secret Show throws ModuleNotFoundError

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az keyvault secret show

Errors:

No module named 'azure.keyvault.v7_0'
Traceback (most recent call last):
python3/dist-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 528, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 299, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
cli/core/commands/__init__.py, ln 291, in load_arguments
    super(AzCliCommand, self).load_arguments()
...
<frozen importlib._bootstrap>, ln 961, in _find_and_load_unlocked
<frozen importlib._bootstrap>, ln 219, in _call_with_frames_removed
<frozen importlib._bootstrap>, ln 1014, in _gcd_import
<frozen importlib._bootstrap>, ln 991, in _find_and_load
<frozen importlib._bootstrap>, ln 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'azure.keyvault.v7_0'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az keyvault secret show

Expected Behavior

Environment Summary

Linux-5.4.0-29-generic-x86_64-with-glibc2.29
Python 3.8.2
Shell: zsh

azure-cli 2.0.81 *

Extensions:
azure-devops 0.17.0

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
aaronbacommented, Jun 6, 2020

I repro’ed this on a clean WSL2 Ubuntu 20.04 build after installing AZ CLI with npm install azure-cli For clarity: To fix:

REMOVE UPDATED AZURE-KEYVAULT

**pip3 uninstall azure-keyvault**
Found existing installation: azure-keyvault 4.1.0
Uninstalling azure-keyvault-4.1.0:
  Would remove:
    /home/[user]/.local/lib/python3.8/site-packages/azure_keyvault-4.1.0.dist-info/*
Successfully uninstalled azure-keyvault-4.1.0

INSTALL VERSION 1.1.0

**pip3 install azure-keyvault==1.1.0**
Collecting azure-keyvault==1.1.0
  Downloading azure_keyvault-1.1.0-py2.py3-none-any.whl (352 kB)
     |████████████████████████████████| 352 kB 1.5 MB/s
Requirement already satisfied: msrest>=0.5.0 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (0.6.10)
Requirement already satisfied: cryptography>=2.1.4 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (2.8)
Collecting azure-nspkg>=2.0.0
  Downloading azure_nspkg-3.0.2-py3-none-any.whl (1.5 kB)
Requirement already satisfied: msrestazure<2.0.0,>=0.4.32 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (0.6.2)
Requirement already satisfied: requests>=2.18.4 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (2.22.0)
Requirement already satisfied: azure-common~=1.1 in /usr/lib/python3/dist-packages (from azure-keyvault==1.1.0) (1.1.24)
Installing collected packages: azure-nspkg, azure-keyvault
Successfully installed azure-keyvault-1.1.0 azure-nspkg-3.0.2
2reactions
mattpasco-microsoftcommented, May 18, 2020

Forcing pip version to 1.1.0 fixed it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting 'No module named 'azure.keyvault.v7_0' error - Reddit
I logged in using azure service principal using the following command: RUN az login --service-principal -u <user> -p <password> --tenant ...
Read more >
986657 - azure-cli: az keyvault throws ModuleNotFound error
az keyvault secret show --vault-name VAULTNAME -n KEY --query value --output tsv ERROR: CLIInternalError: The command failed with an ...
Read more >
SecretClient class in azure-keyvault-secrets python package ...
But it's throwing an error which might be because of any updates in the python package. Could anyone point out what's going wrong?...
Read more >
ModuleNotFoundError: No module named 'azure-keyvault'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'azure-keyvault' How to remove the Mod.
Read more >
azure-storage-blob - PyPI
az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount ... This list can be used for reference to catch thrown exceptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found