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

storage_blob_download() got an unexpected keyword argument 'location_mode' #30634

Open
himachida opened this issue Jan 9, 2025 · 2 comments
Open
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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage Upgrade az upgrade
Milestone

Comments

@himachida
Copy link

Describe the bug

The following error occurs when downloading a blob from the secondary region.
(base) PS C:\Users\hmachida> az storage azcopy blob download -c data --account-name hmachidastorage3-secondary -s "test.txt" -d "test.txt"
The command failed with an unexpected error. Here is the traceback:
storage_blob_download() got an unexpected keyword argument 'location_mode'
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 723, in run_job
File "C:\Users\hmachida.azure\cliextensions\storage-preview\azext_storage_preview_init
.py", line 277, in new_handler
handler(ex)
File "C:\Users\hmachida.azure\cliextensions\storage-preview\azext_storage_preview_init
.py", line 212, in handler
raise ex
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
TypeError: storage_blob_download() got an unexpected keyword argument 'location_mode'

Related command

az storage azcopy blob download

Errors

The command failed with an unexpected error. Here is the traceback:
storage_blob_download() got an unexpected keyword argument 'location_mode'
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 723, in run_job
File "C:\Users\hmachida.azure\cliextensions\storage-preview\azext_storage_preview_init
.py", line 277, in new_handler
handler(ex)
File "C:\Users\hmachida.azure\cliextensions\storage-preview\azext_storage_preview_init
.py", line 212, in handler
raise ex
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
TypeError: storage_blob_download() got an unexpected keyword argument 'location_mode'

Issue script & Debug output

Can't remove all sensitive information

Expected behavior

Download succeeds.

Environment Summary

(base) PS C:\Users\hmachida> az --version
azure-cli 2.61.0 *

core 2.61.0 *
telemetry 1.1.0

Extensions:
account 0.2.5
containerapp 0.3.36
ssh 2.0.1
storage-preview 0.9.0

Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\hmachida.azure\cliextensions'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'

Additional context

No response

@himachida himachida added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 9, 2025
Copy link

Hi @himachida,

2.61.0 is not the latest Azure CLI(2.67.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 Jan 9, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 9, 2025

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

@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 Jan 9, 2025
@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 Upgrade az upgrade labels Jan 9, 2025
@yonzhan yonzhan removed the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 10, 2025
@yonzhan yonzhan added this to the Backlog milestone Jan 10, 2025
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. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage az storage Upgrade az upgrade
Projects
None yet
Development

No branches or pull requests

5 participants