Downloading csv from Cloud Storage to local machine using python

Dear Members, 

I am a bit new to the community, I am called Anthony Matovu from Uganda, just certified in GCP Machine Learning. 

Now I am facing some challenge, I would like to download a csv file I have in cloud storage to a local machine using python, when I put in the authenticated URL in a browser, the file gets downloaded, but when I put the same URL in the python code, it downloads the html not the CSV file.

Please help me.

Anthony

(PII Removed by Staff)

thank you.

 

Solved Solved
1 2 2,158
1 ACCEPTED SOLUTION

Greetings @AnthonyMatovu!

Welcome to the Google Cloud Community!

Refer to this documentation: Downloading Objects from your buckets in Cloud Storage. 

  1. You need to have the proper IAM permissions to download an object.
  2. Under downloading an object from a bucket, navigate to client libraries and select python.
  3. You can use the example as a reference when downloading an object.

If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

View solution in original post

2 REPLIES 2

Greetings @AnthonyMatovu!

Welcome to the Google Cloud Community!

Refer to this documentation: Downloading Objects from your buckets in Cloud Storage. 

  1. You need to have the proper IAM permissions to download an object.
  2. Under downloading an object from a bucket, navigate to client libraries and select python.
  3. You can use the example as a reference when downloading an object.

If the above option doesn't work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

Thank you Marramirez