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
{{ message }}
Repository navigation
Able to delete group even when opened as readonly #3147
Since #3068 (currently unreleased), zarr.open_group(store=writeable_store, read_only=True) errors:
Store is not read-only but mode is 'r'
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/storage/_common.py", line 90, in open
raise ValueError(f"Store is not read-only but mode is '{mode}'")
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/storage/_common.py", line 337, in make_store_path
result = await StorePath.open(store, path=path_normalized, mode=mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/api/asynchronous.py", line 837, in open_group
store_path = await make_store_path(store, mode=mode, storage_options=storage_options, path=path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/core/sync.py", line 119, in _runner
return await coro
^^^^^^^^^^
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/core/sync.py", line 163, in sync
raise return_result
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/api/synchronous.py", line 535, in open_group
async_api.open_group(
...<14 lines>...
File "/Users/max/Documents/Code/zarr-developers/zarr-python/src/zarr/_compat.py", line 43, in inner_f
return f(*args, **kwargs)
File "/Users/max/Documents/Code/zarr-developers/zarr-python/.vscode/del-group.py", line 12, in <module>
root_readonly = zarr.open_group(store, path='/', mode='r')
File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/runpy.py", line 88, in _run_code
exec(code, run_globals)
File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/runpy.py", line 198, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
ValueError: Store is not read-only but mode is 'r'
with the proposal in #3068 (comment) you would instead get an error on del root_readonly['foo'].
Activity
d-v-b commentedon Jun 18, 2025
at the moment
mode=rfor arrays and groups is a placebo. This is related to #3068 (comment)maxrjones commentedon Jun 18, 2025
Since #3068 (currently unreleased),
zarr.open_group(store=writeable_store, read_only=True)errors:with the proposal in #3068 (comment) you would instead get an error on
del root_readonly['foo'].TomNicholas commentedon Jun 18, 2025
I don't have much context, but that sounds more intuitive to me.