Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCSFileSystem.exists() not working with bucket only #34

Closed
yan-hic opened this issue Nov 18, 2017 · 4 comments
Closed

GCSFileSystem.exists() not working with bucket only #34

yan-hic opened this issue Nov 18, 2017 · 4 comments

Comments

@yan-hic
Copy link
Contributor

yan-hic commented Nov 18, 2017

when checking on bucket existence, I get

ValueError: Bad Request: b/
Unknown project id: 0

Issue is actually with _list_buckets() and the get call to list buckets. The API requires the pass the project ID, not the project name - see https://cloud.google.com/storage/docs/json_api/v1/buckets/list and https://cloud.google.com/storage/docs/projects

BTW, that ID is also required to create a bucket so mkdir() has same issue

This was not spotted before if you happened to have project name = ID

@martindurant
Copy link
Member

I don't really know the difference between the "name" and "id" of a project, but if I instantiate GCSFileSystem with project= and what I thought was the name, then list, make and delete buckets works. This is then probably a case for better documentation and error messaging.

Thanks, @yiga2 , for listing your experiences with gcsfs, it's good to have more eyes on it.

@martindurant
Copy link
Member

Ah, in our case, the project name and id are the same :)

@yan-hic
Copy link
Contributor Author

yan-hic commented Nov 20, 2017

I was trying to find a way to look up a project ID based on client + project name but couldn't find any suitable API.
Google's gsutil and client libraries require project ID for a reason.
@martindurant to your point, maybe documentation should everywhere refer to project ID explicitly.
Feel free to close.

@martindurant
Copy link
Member

Fixed in #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants