Skip to content

storage_transformers are not an accepted keyword for ArrayV3Metadata #2178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mpiannucci opened this issue Sep 12, 2024 · 3 comments · Fixed by #2180
Closed

storage_transformers are not an accepted keyword for ArrayV3Metadata #2178

mpiannucci opened this issue Sep 12, 2024 · 3 comments · Fixed by #2180
Labels
bug Potential issues with the zarr-python library
Milestone

Comments

@mpiannucci
Copy link
Contributor

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

@d-v-b
Copy link
Contributor

d-v-b commented Sep 12, 2024

sorry about that! although we don't have any code in zarr-python right now that can actually do anything with a storage transformer, we should support that key in metadata. #2180 aims to fix this.

@mpiannucci
Copy link
Contributor Author

Awesome thank you!

@jhamman
Copy link
Member

jhamman commented Sep 13, 2024

yeah - thanks @d-v-b for hopping right on this :)

@jhamman jhamman added this to the 3.0.0.beta milestone Sep 13, 2024
@jhamman jhamman moved this to Todo in Zarr-Python - 3.0 Sep 13, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Zarr-Python - 3.0 Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Potential issues with the zarr-python library
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants