You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
blob.download_to_filename() broken with 0.27.0 #3841
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__
Activity
dhermes commentedon Aug 18, 2017
@tcroiset Thanks for reporting. I'm sorry to say this is the third or fourth such report (100% my fault this error is occurring).
The simple fix: make sure
requests >= 2.18.0. We have releasesgoogle-cloud-storage==1.3.2(via #3814) to ensure the minimum version.Sorry for the inconvenience.
kparaju commentedon Mar 7, 2018
I had to uninstall requests 2.18.4 (pip uninstall requests) and install 2.18.0 (pip install requests==2.18.0) to make it work
jasonmellone commentedon Sep 6, 2020
Still getting this as of date posting. Shouldn't https://anaconda.org/conda-forge/google-cloud-storage solve for this?