You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When opening a v3 store, it is possible to trigger zarr.errors.ReadOnlyError: object is read-only when mode='r'.
Steps to reproduce
The reproducer here is a bit tough because it requires using Fsspec+Kerchunk+ZarrV3 but I'll show a traceback and point to a traceback and a where the offending code is in Zarr:
Zarr version
v2.14.2
Numcodecs version
v0.11.0
Python Version
3.10.8
Operating System
Mac (M2)
Installation
pip
Description
When opening a v3 store, it is possible to trigger
zarr.errors.ReadOnlyError: object is read-only
whenmode='r'
.Steps to reproduce
The reproducer here is a bit tough because it requires using Fsspec+Kerchunk+ZarrV3 but I'll show a traceback and point to a traceback and a where the offending code is in Zarr:
Traceback:
This happens because Zarr is trying to add a key to a store that is opened with mode='w':
zarr-python/zarr/_storage/v3.py
Lines 621 to 622 in 4b0705c
Additional output
A localized reproducer can be triggered like this:
The full reproducer is a test failure in Kerchunk:
Proposal
This could be a fairly simple fix to
_normalize_store_arg_v3
where the 'zarr.json' key is only added when the store is writable:cc @martindurant
The text was updated successfully, but these errors were encountered: