File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,11 @@ def read_zarr(
155155 resolved_store = _resolve_zarr_store (store )
156156 root_group = zarr .open_group (resolved_store , mode = "r" )
157157 # the following is the SpatialDataContainerFormat version
158- sdata_version = root_group .metadata .attributes ["spatialdata_attrs" ]["version" ]
158+ 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" ]
159163 if sdata_version == "0.1" :
160164 warnings .warn (
161165 "SpatialData is not stored in the most current format. If you want to use Zarr v3"
You can’t perform that action at this time.
0 commit comments