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

Unable to upload files to storage account #30779

Open
srinadhbh opened this issue Feb 6, 2025 · 5 comments
Open

Unable to upload files to storage account #30779

srinadhbh opened this issue Feb 6, 2025 · 5 comments
Assignees
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve 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. Possible-Solution question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue Storage az storage
Milestone

Comments

@srinadhbh
Copy link

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az storage blob upload

Errors:

The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not iterable
Traceback (most recent call last):
  File "/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 561, in execute
    self.commands_loader.load_arguments(command)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 516, in load_arguments
    loader.load_arguments(command)  # this adds entries to the argument registries
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 31, in load_arguments
    load_arguments(self, command)
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_params.py", line 1713, in load_arguments
    help_str = 'Allowed values: {}. Can be combined'.format(get_permission_help_string(t_share_permissions))
  File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/_validators.py", line 862, 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.

  • Put any pre-requisite steps here...
  • az storage blob upload --account-name {} --auth-mode {} -c {} -f {} -n {}

Expected Behavior

Environment Summary

Linux-5.14.0-503.21.1.el9_5.x86_64-x86_64-with-glibc2.34, AlmaLinux 9.5 (Teal Serval)
Python 3.9.21
Installer: RPM

azure-cli 2.38.2 *

Additional Context

Copy link

Hi @srinadhbh,

2.38.2 is not the latest Azure CLI(2.68.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Feb 6, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage az storage labels Feb 6, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 6, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot 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 labels Feb 6, 2025
Copy link

github-actions bot commented Feb 6, 2025

Here are some similar issues that might help you. Please check if they can solve your problem.


Possible solution (Extracted from existing issue, might be incorrect; please verify carefully)

Solution 1:

Please ensure the storage dependency is correctly installed. This error occurs when no enum definition read from dependency SDK. Here's the official doc for installing cli together with all the dependencies: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Reference:

Solution 2:

You need to install python3.6, in other words, make python3.6 executable. cat /usr/bin/az shows that it tries to use python3.6 to run az, if not found, uses python3 instead. Thus, the error raises.

Reference:

@yonzhan yonzhan added this to the Backlog milestone Feb 7, 2025
@calvinhzy
Copy link
Member

Hi @srinadhbh,
Seems like an incomplete install. Please try updating to the latest version following the guide here https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt

@bebound
Copy link
Contributor

bebound commented Feb 7, 2025

Duplicate of #24772
az 2.38.2 should use Python 3.6 but it uses Python 3.9.21 in your device.
I assume you install the wrong version.

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 Auto-Resolve Auto resolve 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. Possible-Solution question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Similar-Issue Storage az storage
Projects
None yet
Development

No branches or pull requests

5 participants