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 storage blob download" errors with or without any options provided, NoneType error

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az storage blob download

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 556, in execute
    self.commands_loader.load_arguments(command)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 518, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 31, in load_arguments
    load_arguments(self, command)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_params.py", line 1839, in load_arguments
    help=sas_help.format(get_permission_help_string(t_file_system_permissions)),
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_validators.py", line 772, in get_permission_help_string
    return ' '.join(['({}){}'.format(x[0], x[1:]) for x in allowed_values])
TypeError: 'NoneType' object is not iterable

To Reproduce:

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

  • az storage blob download

Expected Behavior

File specified is downloaded

Environment Summary

Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-debian-10.12, Debian GNU/Linux 10 (buster)
Python 3.6.10
Installer: DEB

azure-cli 2.32.0

Extensions:
storage-preview 0.8.2
account 0.2.3

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jiaslicommented, Jul 18, 2022

Azure CLI installed using apt is at /opt/az/lib/python3.10/site-packages, but if you install packages with pip3, it will interfere with apt Azure CLI’s installation:

sudo apt install azure-cli
pip3 install azure-mgmt-resource
$ /opt/az/bin/python3 -m pip list -v
Package                                 Version   Location                                        Installer
--------------------------------------- --------- ----------------------------------------------- ---------
adal                                    1.2.7     /opt/az/lib/python3.10/site-packages            pip
antlr4-python3-runtime                  4.9.3     /opt/az/lib/python3.10/site-packages
applicationinsights                     0.11.9    /opt/az/lib/python3.10/site-packages            pip
argcomplete                             1.11.1    /opt/az/lib/python3.10/site-packages            pip
asn1crypto                              0.24.0    /opt/az/lib/python3.10/site-packages            pip
azure-appconfiguration                  1.1.1     /opt/az/lib/python3.10/site-packages            pip
azure-batch                             12.0.0    /opt/az/lib/python3.10/site-packages            pip
azure-cli                               2.38.0    /opt/az/lib/python3.10/site-packages
azure-cli-core                          2.38.0    /opt/az/lib/python3.10/site-packages
azure-cli-telemetry                     1.0.6     /opt/az/lib/python3.10/site-packages
azure-common                            1.1.28    /home/user2/.local/lib/python3.10/site-packages pip
azure-core                              1.24.2    /home/user2/.local/lib/python3.10/site-packages pip
...

We recommend installing with only one method - either apt or pip. If you have to install twice with 2 tools, you may install Azure CLI with pip in a virtual environment. You may see https://github.com/Azure/azure-cli/issues/20476#issuecomment-1007131837 for detailed instruction.

1reaction
GavBurkecommented, Jul 15, 2022

Actually, then even “az storage blob” gives an error, if it helps narrow down the issue… az storage blob.txt

I’ve tried restarting my Docker Desktop now, even restarting my laptop, and the “az storage blob” command is again now completely broke in my devcontainer.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting failures when trying to download a blob from ...
and I am getting this error: The command failed with an unexpected error. Here is the traceback: 'BlobServiceClient' object has no attribute 'exists'...
Read more >
az servicebus list gives NoneType error in python
Command Name I tried az servicebus namespace list but after some outputs it gives me NoneType error means no data is retrieved.
Read more >
az storage blob delete-batch command in Azure Devops
Hello,. I have added Azure CLI (2.11.1) n my release pipeline to remove blob contents from $web container before copying the new build....
Read more >
azure-storage-blob - PyPI
Azure Storage Blobs client library for Python. Azure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for ......
Read more >
Robot Framework User Guide
Provides a simple library API for creating customized test libraries which can ... The error message assigned to a failed test case is...
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