We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79cf8c9 commit 0128c29Copy full SHA for 0128c29
1 file changed
src/spatialdata/_io/io_zarr.py
@@ -155,7 +155,11 @@ def read_zarr(
155
resolved_store = _resolve_zarr_store(store)
156
root_group = zarr.open_group(resolved_store, mode="r")
157
# the following is the SpatialDataContainerFormat version
158
- sdata_version = root_group.metadata.attributes["spatialdata_attrs"]["version"]
+ if "spatialdata_attrs" not in root_group.metadata.attributes:
159
+ # backward compatibility for pre-versioned SpatialData zarr stores
160
+ sdata_version = cast(Literal["0.1", "0.2"], "0.1")
161
+ else:
162
+ sdata_version = root_group.metadata.attributes["spatialdata_attrs"]["version"]
163
if sdata_version == "0.1":
164
warnings.warn(
165
"SpatialData is not stored in the most current format. If you want to use Zarr v3"
0 commit comments