Azure / Azure/azure-cli-extensions
"account tenant list" fails with: No module named 'azure.core.rest'
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
### **This is autogenerated. Please review and update as needed.**
## Describe the bug
**Command Name**
`az account tenant list
Extension Name: account. Version: 0.2.3.`
**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
No module named 'azure.core.rest'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.27.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
File "/Users/xxxxxx/.azure/cliextensions/account/azext_account/manual/_client_factory.py", line 20, in cf_tenants
return cf_account(cli_ctx).tenants
File "/Users/xxxxxx/.azure/cliextensions/account/azext_account/manual/_client_factory.py", line 9, in cf_account
from ..vendored_sdks.subscription import SubscriptionClient
File "/Users/xxxxxx/.azure/cliextensions/account/azext_account/vendored_sdks/subscription/__init__.py", line 9, in
from ._subscription_client import SubscriptionClient
File "/Users/xxxxxx/.azure/cliextensions/account/azext_account/vendored_sdks/subscription/_subscription_client.py", line 12, in
from azure.core.rest import HttpRequest, HttpResponse
ModuleNotFoundError: No module named 'azure.core.rest'
```
## 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 account tenant list`
## Expected Behavior
Get the tenants for our account as per
https://docs.microsoft.com/en-us/cli/azure/account/tenant?view=azure-cli-latest
## Environment Summary
```
macOS-12.4-x86_64-i386-64bit
Python 3.8.11
Installer: HOMEBREW
azure-cli 2.27.0 *
Extensions:
kusto 0.3.0
azure-iot 0.10.15
azure-devops 0.21.0
account 0.2.3
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.