Skip to content

blob.download_to_filename() broken with 0.27.0 #3841

@tcroiset

Description

@tcroiset

I open the bug here since it's linked to the new release 0.27.0 (urrlib2 -> requests), though it crashes in dependency google-resumable-media-python

  File "/home/tristan/p/api/api/utilities/storage.py", line 21, in get_gcs_blob
    blob.download_to_filename(local_path)
  File "/home/tristan/env/api/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 482, in download_to_filename
    self.download_to_file(file_obj, client=client)
  File "/home/tristan/env/api/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 464, in download_to_file
    self._do_download(transport, file_obj, download_url, headers)
  File "/home/tristan/env/api/local/lib/python2.7/site-packages/google/cloud/storage/blob.py", line 418, in _do_download
    download.consume(transport)
  File "/home/tristan/env/api/local/lib/python2.7/site-packages/google/resumable_media/requests/download.py", line 101, in consume
    self._write_to_stream(result)
  File "/home/tristan/env/api/local/lib/python2.7/site-packages/google/resumable_media/requests/download.py", line 62, in _write_to_stream
    with response:
AttributeError: __exit__

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.status: duplicateDuplicate.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions