Skip to content

Latest az cli fails to run download-batch command #21966

@taoisu

Description

@taoisu

%23%23%23 This is autogenerated. Please review and update as needed.

%23%23 Describe the bug

Command Name
az storage blob download-batch

Errors:

The command failed with an unexpected error. Here is the traceback:
'BlobServiceClient' object has no attribute 'exists'
Traceback (most recent call last):
  File "/opt/az/lib/python3.8/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 713, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/__init__.py", line 385, in new_handler
    first(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/__init__.py", line 385, in new_handler
    first(ex)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/_exception_handler.py", line 17, in file_related_exception_handler
    raise ex
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 363, in storage_blob_download_batch
    source_blobs = collect_blobs(client, source_container_name, pattern)
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/util.py", line 16, in collect_blobs
    return [name for (name, _) in collect_blob_objects(blob_service, container, pattern)]
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/util.py", line 16, in <listcomp>
    return [name for (name, _) in collect_blob_objects(blob_service, container, pattern)]
  File "/opt/az/lib/python3.8/site-packages/azure/cli/command_modules/storage/util.py", line 31, in collect_blob_objects
    if blob_service.exists(container, pattern):
AttributeError: 'BlobServiceClient' object has no attribute 'exists'

%23%23 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 download-batch -d {} -s {} --auth-mode {} --account-name {} --subscription {} --pattern {}

%23%23 Expected Behavior

%23%23 Environment Summary

Linux-5.4.0-1063-azure-x86_64-with-glibc2.27, Ubuntu 18.04.6 LTS
Python 3.8.12
Installer: DEB

azure-cli 2.35.0

Extensions:
azure-cli-ml 1.37.0

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

%23%23 Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions