Skip to content

zarr 2.10.0 fails to load pre-existing nested files #840

@abred

Description

@abred

Minimal, reproducible code sample, a copy-pastable example if possible

import numpy as np
import zarr
a = np.ones((2,2)) 
z = zarr.open(zarr.NestedDirectoryStore("test.zarr"), 'w')
z['test'] = a

z = zarr.open(zarr.NestedDirectoryStore("test.zarr"), 'r')
print(np.array(z['test']))

arr = zarr.open(zarr.NestedDirectoryStore("path/to/existing/zarr/file.zarr"), 'r')
print(np.max(arr['volumes/raw']))

output with zarr 2.10.0:
array([[1., 1.],
[1., 1.]])
0

output with zarr 2.3.0:
array([[1., 1.],
[1., 1.]])
6733

Problem description

With the current version of zarr (2.10.0) pre-existing zarr files using NestedDirectoryStore are all zero when read.
With an older version (tested with 2.3.0) the correct values are loaded.
Creating a new zarr file using NestedDirectoryStore on 2.10.0 and reading it works correctly.

Version and installation information

Please provide the following:

  • Value of zarr.__version__: '2.10.0'
  • Value of numcodecs.__version__: '0.9.1'
  • Version of Python interpreter: 3.8.11
  • Operating system (Linux/Windows/Mac): Linux
  • How Zarr was installed (e.g., "using pip into virtual environment", or "using conda"): pip install

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions