From 2c94d98ed21cc768cfa54fac3d734254fc4d8480 Mon Sep 17 00:00:00 2001 From: Sameena Shaffeeullah Date: Tue, 25 Jan 2022 11:53:47 -0800 Subject: [PATCH] docs: fixed download_blob_to_file example (#704) * docs: fixed download_blob_to_file example * Update google/cloud/storage/client.py Co-authored-by: cojenco Co-authored-by: cojenco --- google/cloud/storage/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/storage/client.py b/google/cloud/storage/client.py index 042b3513e..a62ed711f 100644 --- a/google/cloud/storage/client.py +++ b/google/cloud/storage/client.py @@ -1089,7 +1089,7 @@ def download_blob_to_file( >>> from google.cloud import storage >>> client = storage.Client() - >>> with open('file-to-download-to', 'w') as file_obj: + >>> with open('file-to-download-to', 'wb') as file_obj: >>> client.download_blob_to_file( >>> 'gs://bucket_name/path/to/blob', file_obj)