-
-
Notifications
You must be signed in to change notification settings - Fork 380
Open
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
v3.1.3
Numcodecs version
N/A
Python Version
3.11.11
Operating System
Linux
Installation
uv
Description
LoggingStore, LatencyStore and CacheStore all don't support with_read_only.
This is a pain to work with. Particularly with xarray, which defaults to needing a readonly store.
Steps to reproduce
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
# "xarray",
# ]
# ///
#
from zarr.storage import LocalStore, LoggingStore
import xarray as xr
store = LocalStore(root="tmp", read_only=False)
store = LoggingStore(store)
dataset = xr.open_dataset(store, engine="zarr", mode="w") # Works
dataset = xr.open_dataset(store, engine="zarr") # FailsFails with
ValueError: Store is not read-only but mode is 'r'. Unable to create a read-only copy of the store. Please use a read-only store or a storage class that implements .with_read_only().
Additional output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugPotential issues with the zarr-python libraryPotential issues with the zarr-python library