MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

ValueError: compressor cannot be used for arrays with zarr_format 3

Open KumoLiu opened this issue 7 months ago • 1 comments

======================================================================
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.

KumoLiu avatar Jun 09 '25 09:06 KumoLiu

Has this been fixed by 3d6021a69adc2af77a54451511782f61bc5ed1fc?

dzenanz avatar Nov 07 '25 21:11 dzenanz