Skip to content

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

Description

@himachida

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

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storageUpgradeaz upgradeact-codegen-extensibility-squadact-platform-engineering-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions