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 storage account create -n myuniquename -g acme => TypeError: 'NoneType' object is not iterable #23990

Closed
jlegido opened this issue Sep 23, 2022 · 10 comments
Assignees
Labels
Auto-Assign Auto assign 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. CXP Attention This issue is handled by CXP team. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Milestone

Comments

@jlegido
Copy link

jlegido commented Sep 23, 2022

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

  1. Logn
az login --scope https://graph.microsoft.com//.default --use-device-code
  1. Complete MFA

  2. Select right subscription

az account set --subscription acme
  1. Create Resource Group
az group create -l westus -n acme
  1. 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

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Sep 23, 2022
@ghost ghost added this to the Backlog milestone Sep 23, 2022
@ghost ghost assigned evelyn-ys Sep 23, 2022
@ghost ghost added Auto-Assign Auto assign by bot ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group labels Sep 23, 2022
@ghost ghost assigned zhoxing-ms Sep 23, 2022
@ghost ghost added the Account az login/account label Sep 23, 2022
@ghost ghost assigned jiasli Sep 23, 2022
@ghost ghost added Graph az ad Installation labels Sep 23, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 23, 2022

@evelyn-ys for awareness

@yonzhan yonzhan 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 and removed Account az login/account Graph az ad ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group Installation labels Sep 23, 2022
@evelyn-ys
Copy link
Member

Please check if the dependency azure-multiapi-storage has been installed correctly

@yonzhan yonzhan added the CXP Attention This issue is handled by CXP team. label Sep 23, 2022
@ghost
Copy link

ghost commented Sep 23, 2022

Thank you for your feedback. This has been routed to the support team for assistance.

@jlegido
Copy link
Author

jlegido commented Sep 23, 2022

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

@bebound
Copy link
Contributor

bebound commented Oct 8, 2022

/usr/lib/python3/dist-packages/azure/ indicates that you are using the unofficial version.

Duplicate of #19502

@navba-MSFT navba-MSFT added the needs-author-feedback More information is needed from author to address the issue. label Oct 19, 2022
@navba-MSFT navba-MSFT self-assigned this Oct 20, 2022
@navba-MSFT
Copy link
Contributor

@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 #19640.

@jlegido
Copy link
Author

jlegido commented Oct 20, 2022

Many thanks everyone, I added a comment #19640 (comment) to see how can I install azure-cli from official sources

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Oct 20, 2022
@navba-MSFT
Copy link
Contributor

@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 navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels Oct 20, 2022
@jlegido
Copy link
Author

jlegido commented Oct 20, 2022

@navba-MSFT I guess this is exactly what I tried without luck, see my comment, #19640 (comment)

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Oct 20, 2022
@navba-MSFT navba-MSFT removed the needs-team-attention This issue needs attention from Azure service team or SDK team label Oct 21, 2022
@navba-MSFT
Copy link
Contributor

@jlegido Closing this thread since the discussion is taken forward on this thread. #19640 (comment)

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 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. CXP Attention This issue is handled by CXP team. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage
Projects
None yet
Development

No branches or pull requests

7 participants