Skip to content
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

zarr.open do not allow creating group file [v3] #2143

Closed
Czaki opened this issue Aug 31, 2024 · 0 comments · Fixed by #2158
Closed

zarr.open do not allow creating group file [v3] #2143

Czaki opened this issue Aug 31, 2024 · 0 comments · Fixed by #2158
Labels
bug Potential issues with the zarr-python library

Comments

@Czaki
Copy link

Czaki commented Aug 31, 2024

Zarr version

v3.0.0a2

Numcodecs version

0.13.0

Python Version

3.x

Operating System

all

Installation

virtualenv in tox

Description

In napari project we have --pre test, ant they start failing. As zarr 3 requires positional only arguments in open I have opened a PR to prepare napari on zarr 3. however I found that when I want to create zarr group file using grp = zarr.open(store=str(root_path), mode='a') it fails with TypeError: create() missing 1 required positional argument: 'shape' https://github.com/napari/napari/actions/runs/10643480724/job/29507082501?pr=7215#step:8:728

I have checked zarr code and found:

try:
return await open_array(store=store_path, zarr_format=zarr_format, mode=mode, **kwargs)
except KeyError:
return await open_group(store=store_path, zarr_format=zarr_format, mode=mode, **kwargs)

So it looks like older implementation was raising KeyError, not TypeError (as this lines comes from older PR than

return await create(
store=store_path,
path=path,
zarr_format=zarr_format,
overwrite=store_path.store.mode.overwrite,
**kwargs,
)

Steps to reproduce

Call zarr.open(store=str(root_path), mode='a') with path to a non-existing zarr file.

Additional output

No response

@Czaki Czaki added the bug Potential issues with the zarr-python library label Aug 31, 2024
@Czaki Czaki changed the title zarr.open ddo not allow creating group file [v3] zarr.open do not allow creating group file [v3] Aug 31, 2024
Czaki added a commit to napari/napari that referenced this issue Sep 7, 2024
# References and relevant issues
closes #7253

# Description

The zarr-developers/zarr-python#2143 is still
not resolved, so we need to block the next alpha.
jni pushed a commit to napari/napari that referenced this issue Sep 16, 2024
# References and relevant issues
closes #7270

# Description
as zarr-developers/zarr-python#2143 is not
resolved yet we need to block next alpha release. But there is
zarr-developers/zarr-python#2158 opened, so it
should be resolved shortly.
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant