Skip to content

storage_transformers are not an accepted keyword for ArrayV3Metadata #2178

Closed
@mpiannucci

Description

@mpiannucci

Zarr version

3.0.0a3

Numcodecs version

0.13.0

Python Version

3.11.9

Operating System

Mac

Installation

pip install

Description

The zarr v3 Array metadata spec specfies the storage_transformers key can exist, but zarr crashes when reading a buffer that includes the storage_transformers key, even as an empty list:

TypeError: ArrayV3Metadata.__init__() got an unexpected keyword argument 'storage_transformers'

Steps to reproduce

import json
import zarr

metadata = json.loads("""{
  "zarr_format": 3,
  "node_type": "array",
  "shape": [
    10
  ],
  "data_type": "int64",
  "chunk_grid": {
    "name": "regular",
    "configuration": {
      "chunk_shape": [
        10
      ]
    }
  },
  "chunk_key_encoding": {
    "name": "default",
    "configuration": {
      "separator": "/"
    }
  },
  "fill_value": 0,
  "codecs": [
    {
      "name": "bytes",
      "configuration": {
        "endian": "little"
      }
    }
  ],
  "storage_transformers": null,
  "dimension_names": null,
  "attributes": {
    "foo": 101
  }
}""")

metadata = zarr.core.array.parse_array_metadata(metadata)

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions