azure-cli
azure-cli copied to clipboard
az storage account create -n myuniquename -g acme => TypeError: 'NoneType' object is not iterable
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Related command
az storage account create -n myuniquename -g acme
Describe the bug
I got below error:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 561, in execute
self.commands_loader.load_arguments(command)
File "/usr/lib/python3/dist-packages/azure/cli/core/__init__.py", line 508, in load_arguments
loader.load_arguments(command) # this adds entries to the argument registries
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/storage/__init__.py", line 31, in load_arguments
load_arguments(self, command)
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/storage/_params.py", line 1773, in load_arguments
help_str = 'Allowed values: {}. Can be combined'.format(get_permission_help_string(t_share_permissions))
File "/usr/lib/python3/dist-packages/azure/cli/command_modules/storage/_validators.py", line 865, in get_permission_help_string
return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
TypeError: 'NoneType' object is not iterable
To open an issue, please run: 'az feedback'
And storage account is not created.
To Reproduce
- Logn
az login --scope https://graph.microsoft.com//.default --use-device-code
-
Complete MFA
-
Select right subscription
az account set --subscription acme
- Create Resource Group
az group create -l westus -n acme
- Create Storage Account
az storage account create -n myuniquename -g acme
Expected behavior
See JSON output indicating that the resource was created.
Go to the portal and see the resource there.
Environment summary
I installed Azure CLI following:
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
I run in WSL, but getting same result in an Azure VM with debian testing.
az --version
azure-cli 2.40.0
core 2.40.0
telemetry 1.0.8
Extensions:
cloud-service 0.2.0
account 0.2.2
azure-devops 0.24.0
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.0.0
Python location '/usr/bin/python3'
Extensions directory '/home/nestle/.azure/cliextensions'
Extensions system directory '/usr/lib/python3/dist-packages/azure-cli-extensions'
Python (Linux) 3.10.7 (main, Sep 8 2022, 14:34:29) [GCC 12.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Unable to check if your CLI is up-to-date. Check your internet connection.
OS Version is debian testing:
cat /etc/issue
Debian GNU/Linux bookworm/sid \n \l
Shell type is bash
Additional context
Same issue is found in Azure VM with debian testing and same azure CLI Version
@evelyn-ys for awareness
Please check if the dependency azure-multiapi-storage
has been installed correctly
Thank you for your feedback. This has been routed to the support team for assistance.
Please check if the dependency
azure-multiapi-storage
has been installed correctly
Yes, in both, WSL and VM:
dpkg -l | grep azure-multiapi-storag
ii python3-azure-multiapi-storage 0.10.0-1 all Azure Storage Data Plane SDK supporting multiple API versions
/usr/lib/python3/dist-packages/azure/
indicates that you are using the unofficial version.
Duplicate of https://github.com/Azure/azure-cli/issues/19502
@jlegido Just to add on to the above comment,
Community packagers release unofficial Azure CLI deb packages on multiple Linux repositories. These packages are not maintained by Microsoft, outdated, and contain various bugs.
To install the latest official Azure CLI, please follow the official document: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt and check if that helps.
More Info here https://github.com/Azure/azure-cli/issues/19640.
Many thanks everyone, I added a comment https://github.com/Azure/azure-cli/issues/19640#issuecomment-1285215579 to see how can I install azure-cli from official sources
@jlegido See this comment in the same thread which explains how to install AzCLI from official source and how to uninstall unofficial CLI.
@navba-MSFT I guess this is exactly what I tried without luck, see my comment, https://github.com/Azure/azure-cli/issues/19640#issuecomment-1285215579
@jlegido Closing this thread since the discussion is taken forward on this thread. https://github.com/Azure/azure-cli/issues/19640#issuecomment-1285215579