Skip to content

Commit 4bfad1b

Browse files
committed
fixup
1 parent a62240b commit 4bfad1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/zarr/core/array.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ async def get_array_metadata(
156156
# V3 arrays are comprised of a zarr.json object
157157
assert zarr_json_bytes is not None
158158
metadata_dict = json.loads(zarr_json_bytes.to_bytes())
159+
160+
if metadata_dict.get("node_type") != "array":
161+
# This KeyError is load bearing for `open`. That currently tries
162+
# to open the node as an `array` and then falls back to opening
163+
# as a group.
164+
raise KeyError
159165
return metadata_dict
160166

161167

0 commit comments

Comments
 (0)