-
-
Notifications
You must be signed in to change notification settings - Fork 329
TypeError: Filesystem needs to support async operations #2554
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
Comments
I think this has been fixed upstream -- fsspec/filesystem_spec#1755 @norlandrhagen - would you mind trying with fsspec@main an report back? |
Shall do! I'll give it a spin. |
I installed the latest from fsspec: xr.__version__
'2024.11.0'
zarr.__version__
'3.0.0b3'
fsspec.__version__
'2024.10.0.post24+gc36066c' and getting the same error:
|
@martindurant / @moradology - any idea why we're not getting the async wrapper here? |
Seems familiar... I'm not 100% certain, but it looks to me like the issue for which this draft PR was cut: #2533 |
Funny that this "needs to be async" happens during a I think checking async_impl and auto-wrapping is the right thing to do here. Re-interpreting the URL isn't ideal unless we can guarantee that fsspec and objstore configs are identical, which for local might be OK but in general is not. |
Closing this as this PR fixed this issue. Thanks @moradology! |
* wip toward zarr v2 reader * removed _ARRAY_DIMENSIONS and trimmed down attrs * WIP for zarr reader * adding in the key piece, the reader * virtual dataset is returned! Now to deal with fill_value * Update virtualizarr/readers/zarr.py Co-authored-by: Tom Nicholas <[email protected]> * replace fsspec ls with zarr.getsize * lint * wip test_zarr * removed pdb * zarr import in type checking * moved get_chunk_paths & get_chunk_size async funcs outside of construct_chunk_key_mapping func * added a few notes from PR review. * removed array encoding * v2 passing, v3 skipped for now * added missed staged files * missing return * add network * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * conftest fix * naming * comment out integration test for now * refactored test_dataset_from_zarr ZArray tests * adds zarr v3 req opt * zarr_v3 decorator * add more tests * wip * adds missing await * more tests * wip * wip on v3 * add note + xfail v3 * tmp run network * revert * update construct_virtual_array ordering * updated ABC after merge * wip * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * working for v2 and v3, but only local * cleanup test_zarr reader test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * cleanup after zarr-python issue report * temp disabled validate_and_normalize_path_to_uri due to issue in zarr-python v3: zarr-developers/zarr-python#2554 * marked zarr integration test skipped b/c of zarr-v3 and kerchunk incompatability * fixes some async behavior, reading from s3 seems to work * lint + uri_fmt * adds to releases.rst * nit * cleanup, comments and nits * progress on mypy * make mypy happy * adds option for AsyncArray to _is_zarr_array * big async rewrite * fixes merge conflict * bit of restructure * nit * WIP on ChunkManifest.from_arrays * v2/v3 c chunk fix + build ChunkManifest from numpy arrays * removed method of creating ChunkManifests from dicts * cleanup * adds xfails to TestOpenVirtualDatasetZarr due to local filesystem zarr issue * some nits after merging w/ main * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updates zarr v3 req * lint * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove build_chunk_manifest_from_dict_mapping function since manifest are build from np.ndarrays * tmp ignore lint * remove zarr fill_value skip * fixes network req import in test_integration * bump xarray to 2025.1.1 and icechunk to 0.1.0a10 in upstream * move zarr import into type checking * move zarr import in test_zarr * adding back in missing nbytes property * typing * tmp testing & removing old xfail * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adds back in validate_and_normalize_path_to_uri after upstream zarr fix & vendors concurrent map from zarr-python * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * removing kerchunk from zarr integration test * removed zarr manifest + lint * wip on testing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert min-deps change * merge * revert environment.yaml * removed zarr manifest writing * cleanup and consolidation in zarr reader * typing * test_unsupported_zarr_python to zarr v3 * rel path issue? * revert accidental icechunk commit * wip on fixing codecs * cleaup of tests + codecs * renived test_zarr writer * bumping icechunk for now * typing lint * remove zarr writer test * adds Zarr V2 reader not supported exception * updates usage and releases and lints upstream.yaml * lint + clarified some todo/comments * quick nit, removed duplicated entry in ci * removed some comments and reverted pyproject * pyproj de-dup * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * util fpaht * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adding test to check zarr key format in manifest * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * switched Manifest creation back to dict * cleaned up zarr reader ArrayV3Metadata reading * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * vendor cleanup * merge w/ develop and update construct_virtual_dataset * added _zstd_codec check in get_codec_config to fix numcodecs complaint * mypy lint * mypy lint 2 * lint * typing * adds check for filepath * spelling nit + revert hdf int * removed virtualizarr.zarr + cleanup nits * cleanup + note * updates docs/faq.md data table * revert leading slash * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix bad merge commit * Use ManifestStore in Zarr reader (#554) * Use ManifestStore in Zarr reader * Update virtualizarr/readers/zarr.py Co-authored-by: Raphael Hagen <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Raphael Hagen <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * filepath slash nit * Update docs/faq.md Co-authored-by: Tom Nicholas <[email protected]> * Update virtualizarr/readers/zarr.py Co-authored-by: Tom Nicholas <[email protected]> * Update virtualizarr/readers/zarr.py Co-authored-by: Tom Nicholas <[email protected]> * Update virtualizarr/readers/zarr.py Co-authored-by: Tom Nicholas <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adds back in todo * adds wip test for scalar chunk testing * adds test for scalar zarr + modifies get_chunk_mapping_prefix to accomdate * update localstore to memorystore --------- Co-authored-by: Tom Nicholas <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Max Jones <[email protected]> Co-authored-by: Tom Nicholas <[email protected]>
Zarr version
3.0.0b3
Numcodecs version
0.14.1
Python Version
3.12
Operating System
Mac
Installation
pip
Description
I'm having issues with using
zarr.open_group
for a local Zarr store.calling
zarr.open_group
with a full uri:zg = zarr.open_group('file:///air.zarr')
gives the error:
TypeError: Filesystem needs to support async operations.
calling open_group on a relative local path or an s3 path seems to work fine.
zg = zarr.open_group('air.zarr')
zg = zarr.open_group('s3://carbonplan-share/air_temp.zarr')
Comments from @d-v-b in the Zarr Zulip chat:
Steps to reproduce
Error:
TypeError: Filesystem needs to support async operations.
Traceback:
Additional output
No response
The text was updated successfully, but these errors were encountered: