🌐 AI搜索 & 代理 主页
Skip to content

zarr.load fails with ZipStore unless read_only=False #3042

@FranzForstmayr

Description

@FranzForstmayr

Zarr version

3.0.7

Numcodecs version

0.16.0

Python Version

3.13.1

Operating System

WSL2

Installation

uv pip install zarr

Description

zarr.load fails when reading data from ZipStore.

ValueError: Store is read-only but mode is 'a'

Steps to reproduce

import sys

import numcodecs
import zarr
from zarr.storage import ZipStore

file = "test_data.zip"


def main():
    with ZipStore(file, mode="r", read_only=False) as zs:
        data = zarr.load(store=zs, path="some/data")  # This works
        print(data.shape)

    with ZipStore(file, mode="r") as zs:
        data = zarr.load(store=zs, path="some/data")  # This does not work
        print(data.shape)


if __name__ == "__main__":
    print(zarr.__version__)
    print(numcodecs.__version__)
    print(sys.version)
    main()

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions