Repository navigation
ValueError: compressor cannot be used for arrays with zarr_format 3 #8476
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
======================================================================
ERROR: test_zarr_avg_merger_patches_13 (tests.inferers.test_zarr_avg_merger.ZarrAvgMergerTests.test_zarr_avg_merger_patches_13)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/parameterized/parameterized.py", line 620, in standalone_func
return func(*(a + p.args), **p.kwargs, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/tests/inferers/test_zarr_avg_merger.py", line 301, in test_zarr_avg_merger_patches
merger = ZarrAvgMerger(**arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/monai/utils/module.py", line 477, in _wrapper
return call_obj(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/monai/inferers/merger.py", line 273, in __init__
self.output = zarr.empty(
^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/synchronous.py", line 1151, in empty
return Array(sync(async_api.empty(shape, **kwargs)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/sync.py", line 163, in sync
raise return_result
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/sync.py", line 119, in _runner
return await coro
^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/asynchronous.py", line 1097, in empty
return await create(shape=shape, fill_value=None, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/asynchronous.py", line 1055, in create
return await AsyncArray._create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/array.py", line 600, in _create
raise ValueError(
ValueError: compressor cannot be used for arrays with zarr_format 3. Use bytes-to-bytes codecs instead.
======================================================================
ERROR: test_zarr_avg_merger_patches_14 (tests.inferers.test_zarr_avg_merger.ZarrAvgMergerTests.test_zarr_avg_merger_patches_14)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/parameterized/parameterized.py", line 620, in standalone_func
return func(*(a + p.args), **p.kwargs, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/tests/inferers/test_zarr_avg_merger.py", line 301, in test_zarr_avg_merger_patches
merger = ZarrAvgMerger(**arguments)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/monai/utils/module.py", line 477, in _wrapper
return call_obj(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/MONAI/MONAI/monai/inferers/merger.py", line 273, in __init__
self.output = zarr.empty(
^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/synchronous.py", line 1151, in empty
return Array(sync(async_api.empty(shape, **kwargs)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/sync.py", line 163, in sync
raise return_result
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/sync.py", line 119, in _runner
return await coro
^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/asynchronous.py", line 1097, in empty
return await create(shape=shape, fill_value=None, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/api/asynchronous.py", line 1055, in create
return await AsyncArray._create(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/site-packages/zarr/core/array.py", line 600, in _create
raise ValueError(
ValueError: compressor cannot be used for arrays with zarr_format 3. Use bytes-to-bytes codecs instead.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
Fix: ZarrAvgMerger ValueError with zarr_format 3 (#8477)
dzenanz commentedon Nov 7, 2025
Has this been fixed by 3d6021a?
fix(ZarrAvgMerger): use separate tmpdir attrs to prevent value_store …
markov12 commentedon Sep 12, 2026
Confirmed: the original
compressor cannot be used for arrays with zarr_format 3error no longer occurs on currentdev; it was fixed by #8477. The remaining zarr 3.3 failure is a different issue (chunks=Truerejected), tracked in #9069 and addressed by #9077. This issue can probably be closed.ericspod commentedon Oct 12, 2026
Hi @markov12 i'm reviewing #9077 now and will likely merge it soon, so I will close this issue as you mention it should address your problem.
fix(ZarrAvgMerger): retain independent temporary stores