gcsfs can't access google storage file, switches to anon user
See original GitHub issueI am trying to read a csv file present in gs bucket directly into dataframe.
I used gcloud auth login
to authorize account. But when I try to use gcsfs it thorws:
gcsfs.utils.HttpError: Anonymous caller does not have storage.objects.list access to <my-bucket>
Now I ca list/download my files using gsutil
. I can also list these files by passing adc
file as token to fs=gcsfs.GCSFileSystem(token='adc.json')
. My issue is how do I set it as default. Is there a particular location where I put this file. I couldn’t find anything in docs.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
gcsfs can't access google storage file, switches to anon user
I am trying to read a csv file present in gs bucket directly into dataframe. I used gcloud auth login to authorize account....
Read more >google.cloud.storage allows access but gcsfs does not
To open a file using '“google.cloud.storage'” instead of "gcsfs" you can use the below method, #create storage client storage_client ...
Read more >GCSFs Documentation - Read the Docs
A pythonic file-system interface to Google Cloud Storage. This software is beta, use at your own risk. Please file issues and requests on ......
Read more >Troubleshooting | Cloud Storage
This page describes troubleshooting methods for common errors you may encounter while using Cloud Storage. See the Google Cloud Status Dashboard for ...
Read more >GCSFS — GCSFs 2022.11.0+2.g111769a documentation
A pythonic file-system interface to Google Cloud Storage. This software is beta, use at your own risk. Please file issues and requests on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
See here for how google.auth tries to read your credentials. Enabling application-default worked for me:
gcloud auth application-default login
#255 should fix this issue.
Following code now works just fine:
FYI, to use default GCP authentication fallback mechanism you can use following: