-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
AttributeError: module 'zarr.storage' has no attribute 'DirectoryStore' #2699
Comments
Hi @KumoLiu. The class you are looking for in Zarr v3 is the LocalStore: https://zarr.readthedocs.io/en/stable/api/zarr/storage/index.html#zarr.storage.LocalStore In case you have not seen it, please also be sure to read through the migration guide at https://zarr.readthedocs.io/en/stable/user-guide/v3_migration.html for other breaking changes. |
To be fair, the Store part of the migration guide doesn't mention |
Hi @joshmoore and @dstansby, may I ask what |
@KumoLiu. The registry classes are now available under https://zarr.readthedocs.io/en/stable/api/zarr/registry/index.html. I don't see a v3 version of |
Thanks, does it mean we don't have a |
We did not port the TempStore class over from 2.18. Would something like this work for you? In [1]: import zarr
In [2]: from tempfile import TemporaryDirectory
In [3]: with TemporaryDirectory() as tmpdir:
...: # create a LocalStore from a temp dir
...: store = zarr.storage.LocalStore(tmpdir)
...: root_group = zarr.create_group(store)
...: # or pass the tempdir directly to Zarr
...: root_group = zarr.open_group(tmpdir)
...: print(root_group)
...:
<Group file:///var/folders/6_/834w1yzj49d6t6dz8lpx86fm0000gn/T/tmp8hz_sghs> |
Thanks @jhamman! Let me try this workaround. |
Zarr version
3.0.0
Numcodecs version
0.14.1
Python Version
3.9, 3.10, 3.11
Operating System
linux
Installation
pip install
Description
zarr-python/zarr/storage.py
Line 1003 in 2ab280a
Steps to reproduce
Additional output
No response
The text was updated successfully, but these errors were encountered: