Skip to content

[storage-blob-preview] "az storage blob upload-batch" error when the extension is added #6233

@yangchengs

Description

@yangchengs

Related command

az storage blob upload-batch --account-name yangshendls006 -d container1 -s 'c:\powerShell' --pattern '*.ps1' --destination-path 'path1/v1' --account-key "XXXX" --overwrite true --only-show-errors -o table

Extension name (the extension in question)

az cli version: 2.47.0
storage-blob-preview 0.7.1

Description of issue (in as much detail as possible)

When running the command
az storage blob upload-batch --account-name yangshendls006 -d container1 -s 'c:\powerShell' --pattern '*.ps1' --destination-path 'path1/v1' --account-key "XXXX" --overwrite true --only-show-errors -o table

there will be error
image

ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: add_upload_progress_callback.._update_progress() takes 1 positional argument but 2 were given
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/init.py", line 273, in new_handler
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/operations/blob.py", line 294, in storage_blob_upload_batch
include, result = _upload_blob(cmd, blob_client, file_path=src,
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/util.py", line 226, in wrapper
return True, func(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/operations/blob.py", line 277, in _upload_blob
return upload_blob(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/operations/blob.py", line 725, in upload_blob
response = client.upload_blob(data=stream, length=length, metadata=metadata,
File "/opt/az/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
return func(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/vendored_sdks/azure_storage_blob/v2021_12_02/_blob_client.py", line 746, in upload_blob
return upload_block_blob(**options)
File "/opt/az/lib/python3.10/site-packages/azure-cli-extensions/storage-blob-preview/azext_storage_blob_preview/vendored_sdks/azure_storage_blob/v2021_12_02/_upload_helpers.py", line 123, in upload_block_blob
progress_hook(adjusted_count, adjusted_count)
TypeError: add_upload_progress_callback.._update_progress() takes 1 positional argument but 2 were given

Both Windows and Linux az cli have the same issue.
The command works good when the extension is removed.

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStoragecustomer-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

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions