Comments (3)
It looks like this boils down to this:
>>> fs.ls('pangeo-data')
['pangeo-data/newmann-met-ensemble-netcdf/',
'pangeo-data/newmann-met-ensemble/']
>>> fs.exists('pangeo-data')
ValueError
from gcsfs.
Hm, doing exists(bucket)
is problematic if it doesn't show up as one of your buckets. Perhaps there should be a fallback to listing the bucket.
In fact, testing for the bucket isn't necessary at all if you only ever read, it could be removed, and then you would defer the error to access time if the bucket really doesn't exist.
from gcsfs.
Right, _list_buckets
should probably return []
if you don't own any buckets, and if the bucket is not found in that list, exists(bucket)
should try ls(bucket)
and return True if that succeeds (even if the bucket is empty).
from gcsfs.
Related Issues (20)
- Stale cache info leading to failing isfile check HOT 2
- _find does not support maxdepth
- GCS High Performance Parallel Listing
- Strange behavior with `HTTPError` and multiprocessing HOT 3
- isdir/info method works incorrectly HOT 20
- Clarify how to pass JSON credentials HOT 2
- Is it needed to be so strict about dependency on fsspec HOT 1
- Release 2023.10.0 and consider relaxing fsspec dependency HOT 3
- Error when listing large directory with versions=True
- Request: add chmod
- Issues when using identity_pool.Credentials for connecting GCSFileSystem HOT 2
- Strange error message when using cp instead of put HOT 2
- Filename with slashes in the path are getting URL encoded, causing them to fail HOT 2
- Pin generation on open for version aware file system HOT 4
- asyncio exception while writing to zarr store HOT 5
- Add API reference for gcsfs.mapping to docs HOT 2
- `fs.isdir` latency 200x slower beginning with version 2023.09.01 HOT 1
- Error introduced in 2024.3.0 HOT 2
- FileNotFoundError since 2024.3.1 HOT 5
- Missing 'name' attribute in 'GCSFile' object when accessing PDF files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcsfs.