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

FileNotFoundError in yokogawa-to-zarr task #280

Closed
tcompa opened this issue Jan 17, 2023 · 14 comments · Fixed by #282
Closed

FileNotFoundError in yokogawa-to-zarr task #280

tcompa opened this issue Jan 17, 2023 · 14 comments · Fixed by #282
Labels
High Priority Current Priorities & Blocking Issues

Comments

@tcompa
Copy link
Collaborator

tcompa commented Jan 17, 2023

Ref:

TL;DR
Dask tries to access 20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/B/03/0//0/0/0/0/0', which is obviously wrong (two slashes and too many hierarchy levels - possibly related?1)

More info:

  • Working from 02_cardio_small example of the fractal-demos repo.
  • run_example.sh is the same as on github, apart from removing all tasks that take place after "Convert Yokogawa to OME-Zarr".
$ cat artifacts/workflow_000001_job_000001/workflow.log 

2023-01-17 09:19:08,113; INFO; fractal_server.__VERSION__: 1.0.0rc1
2023-01-17 09:19:08,114; INFO; FRACTAL_RUNNER_BACKEND: process
2023-01-17 09:19:08,114; INFO; slurm_user: tommaso
2023-01-17 09:19:08,114; INFO; worker_init: export CELLPOSE_LOCAL_MODELS_PATH=/home/tommaso/.cache/CELLPOSE_LOCAL_MODELS_PATH
export NUMBA_CACHE_DIR=/home/tommaso/.cache/NUMBA_CACHE_DIR
export NAPARI_CONFIG=/home/tommaso/.cache/NAPARI_CACHE_DIR
export XDG_CONFIG_HOME=/home/tommaso/.cache/XDG

2023-01-17 09:19:08,114; INFO; input metadata: {}
2023-01-17 09:19:08,114; INFO; input_paths: [PosixPath('/home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/../images/10.5281_zenodo.7057076/*.png')]
2023-01-17 09:19:08,114; INFO; output_path: /home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/tmp_cardio-2x2-3/output/*.zarr
2023-01-17 09:19:08,117; INFO; job.id: 1
2023-01-17 09:19:08,117; INFO; job.working_dir: /home/tommaso/Fractal/fractal-demos/examples/server/artifacts/workflow_000001_job_000001
2023-01-17 09:19:08,117; INFO; START workflow "Workflow cardio-2x2-3"
2023-01-17 09:19:08,119; INFO; START 0-th task (name="Create OME-Zarr structure", executor=cpu-low).
2023-01-17 09:19:08,120; INFO; END   0-th task (name="Create OME-Zarr structure", executor=cpu-low).
2023-01-17 09:19:08,120; INFO; START 1-th task (name="Convert Yokogawa to OME-Zarr", executor=cpu-mid).
2023-01-17 09:19:10,639; INFO; FAILED workflow "Workflow cardio-2x2-3", TaskExecutionError.
$ fractal job show 1
{
  "project_id": 1,
  "input_dataset_id": 1,
  "output_dataset_id": 2,
  "workflow_id": 1,
  "overwrite_input": false,
  "worker_init": "export CELLPOSE_LOCAL_MODELS_PATH=/home/tommaso/.cache/CELLPOSE_LOCAL_MODELS_PATH\nexport NUMBA_CACHE_DIR=/home/tommaso/.cache/NUMBA_CACHE_DIR\nexport NAPARI_CONFIG=/home/tommaso/.cache/NAPARI_CACHE_DIR\nexport XDG_CONFIG_HOME=/home/tommaso/.cache/XDG\n",
  "working_dir": "/home/tommaso/Fractal/fractal-demos/examples/server/artifacts/workflow_000001_job_000001",
  "id": 1,
  "start_timestamp": "2023-01-17 08:19:08.101147",
  "status": "failed",
  "history": [
    "Create OME-Zarr structure"
  ]
}

This is the job log:

TASK ERROR:Task id: 2 (Convert Yokogawa to OME-Zarr), e.workflow_task_order=1
TRACEBACK:
2023-01-17 09:19:09,627; INFO; START yokogawa_to_ome_zarr task
2023-01-17 09:19:09,702; INFO; glob path: /home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/../images/10.5281_zenodo.7057076/*_B03_*A01*C01*.png
Traceback (most recent call last):
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fractal_tasks_core/yokogawa_to_ome_zarr.py", line 210, in <module>
    run_fractal_task(
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fractal_tasks_core/_utils.py", line 104, in run_fractal_task
    metadata_update = task_function(**task_args.dict())
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fractal_tasks_core/yokogawa_to_ome_zarr.py", line 172, in yokogawa_to_ome_zarr
    da.array(FOV_4D).to_zarr(
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 2905, in to_zarr
    return to_zarr(self, *args, **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 3640, in to_zarr
    return arr.store(
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 1755, in store
    r = store([self], [target], **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 1229, in store
    compute_as_if_collection(Array, store_dsk, map_keys, **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/base.py", line 342, in compute_as_if_collection
    return schedule(dsk2, keys, **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/threaded.py", line 89, in get
    results = get_async(
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/local.py", line 511, in get_async
    raise_exception(exc, tb)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/local.py", line 319, in reraise
    raise exc
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/local.py", line 224, in execute_task
    result = _execute_task(task, data)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/core.py", line 119, in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 4341, in store_chunk
    return load_store_chunk(x, out, index, lock, return_stored, False)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/dask/array/core.py", line 4323, in load_store_chunk
    out[index] = x
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/core.py", line 1373, in __setitem__
    self.set_basic_selection(pure_selection, value, fields=fields)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/core.py", line 1468, in set_basic_selection
    return self._set_basic_selection_nd(selection, value, fields=fields)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/core.py", line 1772, in _set_basic_selection_nd
    self._set_selection(indexer, value, fields=fields)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/core.py", line 1844, in _set_selection
    self._chunk_setitems(lchunk_coords, lchunk_selection, chunk_values,
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/core.py", line 2046, in _chunk_setitems
    self.chunk_store.setitems(to_store)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/zarr/storage.py", line 1394, in setitems
    self.map.setitems(values)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/mapping.py", line 116, in setitems
    self.fs.pipe(values)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/spec.py", line 757, in pipe
    self.pipe_file(self._strip_protocol(k), v, **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/spec.py", line 736, in pipe_file
    with self.open(path, "wb", **kwargs) as f:
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/spec.py", line 1106, in open
    f = self._open(
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/implementations/local.py", line 175, in _open
    return LocalFileOpener(path, mode, fs=self, **kwargs)
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/implementations/local.py", line 273, in __init__
    self._open()
  File "/home/tommaso/Fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/fractal-tasks-core0.6.5/venv/lib/python3.8/site-packages/fsspec/implementations/local.py", line 278, in _open
    self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/tmp_cardio-2x2-3/output/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/B/03/0//0/0/0/0/0'
@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Quick comments:

  1. The number of hierarchy level is actually correct:
plate.zarr/B/03/0/0/0/0/0/0
plate.zarr/B/03/0/L/C/Z/Y/X   (with L=level)
  1. The double / is actually wrong, but fixing it does not solve the problem:
FileNotFoundError: [Errno 2] No such file or directory: '/home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/tmp_9/output/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/B/03/0/0/0/0/0/0'

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

It seems that going back with zarr version made the difference. This set of versions works:

dask 2022.7.1, https://docs.dask.org/en/stable/changelog.html
zarr 2.13.3, https://zarr.readthedocs.io/en/stable/release.html
fsspec 2022.11.0, https://filesystem-spec.readthedocs.io/en/latest/changelog.html

$ cat workflow.log 


2023-01-17 10:07:09,252; INFO; fractal_server.__VERSION__: 1.0.0rc1
2023-01-17 10:07:09,253; INFO; FRACTAL_RUNNER_BACKEND: process
2023-01-17 10:07:09,253; INFO; slurm_user: tommaso
2023-01-17 10:07:09,253; INFO; worker_init: export CELLPOSE_LOCAL_MODELS_PATH=/home/tommaso/.cache/CELLPOSE_LOCAL_MODELS_PATH
export NUMBA_CACHE_DIR=/home/tommaso/.cache/NUMBA_CACHE_DIR
export NAPARI_CONFIG=/home/tommaso/.cache/NAPARI_CACHE_DIR
export XDG_CONFIG_HOME=/home/tommaso/.cache/XDG

2023-01-17 10:07:09,253; INFO; input metadata: {}
2023-01-17 10:07:09,253; INFO; input_paths: [PosixPath('/home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/../images/10.5281_zenodo.7057076/*.png')]
2023-01-17 10:07:09,253; INFO; output_path: /home/tommaso/Fractal/fractal-demos/examples/02_cardio_small/tmp_13/output/*.zarr
2023-01-17 10:07:09,255; INFO; job.id: 16
2023-01-17 10:07:09,255; INFO; job.working_dir: /home/tommaso/Fractal/fractal-demos/examples/server/artifacts/workflow_000016_job_000016
2023-01-17 10:07:09,255; INFO; START workflow "Workflow 13"
2023-01-17 10:07:09,255; INFO; START 0-th task (name="Create OME-Zarr structure", executor=cpu-low).
2023-01-17 10:07:09,255; INFO; END   0-th task (name="Create OME-Zarr structure", executor=cpu-low).
2023-01-17 10:07:09,256; INFO; START 1-th task (name="Convert Yokogawa to OME-Zarr", executor=cpu-mid).
2023-01-17 10:07:25,842; INFO; END   1-th task (name="Convert Yokogawa to OME-Zarr", executor=cpu-mid).
2023-01-17 10:07:25,843; INFO; END workflow "Workflow 13"

Main suspect (for the moment): https://zarr.readthedocs.io/en/stable/release.html#enhancements

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Other info about zarr versions:

  • 2.13.3 exists on pypi and "works" in fractal
  • 2.13.4 and 2.13.5 only exist as github releases, but not on pipy, so testing them is a bit annoying
  • 2.13.6 exists on pypi and "fails" in fractal

EDIT:

Just realizing that 2.13.4 is likely broken since zarr-developers/zarr-python#1304 is included but this is not!"
(zarr-developers/zarr-python#1309 (comment))

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Possible candidate: dask.array.core.get_mapper(), used in a block like:

    canvas_zarr = zarr.create(
        shape=(len(wavelength_ids), max_z, max_y, max_x),
        chunks=chunksize,
        dtype=sample.dtype,
        store=da.core.get_mapper(zarrurl + "/0"),
        overwrite=False,
        dimension_separator="/",
    )

Refs:

Even more in detail, I'm now looking at this diff:
https://github.com/dask/dask/pull/9790/files#diff-c18e4294c8cf0fc5f9482f4b6435df77d733a0a218bce49dc2147ac425d52fe8L3675-L3681

@jluethi
Copy link
Collaborator

jluethi commented Jan 17, 2023

Wow, thanks for digging into this @tcompa ! Very good if we can solve then underlying TaskError as well and pity that it's a dependency thing once again... 🙈

@jluethi
Copy link
Collaborator

jluethi commented Jan 17, 2023

Also, on the quite confusing side: It still appears to have created a correct OME-Zarr file for me, even though it may be triggering this task error. Have you checked the Zarr files you're getting with the error?

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

More debugging:

This may be the important new zarr codeblock that changed:
https://github.com/zarr-developers/zarr-python/pull/1304/files#diff-565e487a2f60258b6baa2e4db8ef175cc16b8a949651834bd43d0a9f21e07358

With zarr 2.13.6 (the recent one, that doesn't work), we end up in the FSS branch:

FSStore._fsspec_installed(): True
isinstance(store, fsspec.FSMap): True

and then store is a FSStore like this one:

    store: <FSStore({
        '.zarray': (
            b'{\n'
            b'    "chunks": [\n'
            b'        1,\n'
            b'        1,\n'
            b'        2160,\n'
            b'        2560\n'
            b'    ],\n'
            b'    "compressor": {\n'
            b'        "blocksize": 0,\n'
            b'        "clevel": 5,\n'
            b'        "cname": "lz4",\n'
            b'        "id": "blosc",\n'
            b'        "shuffle": 1\n'
            b'    },\n'
            b'    "dimension_separator": "/",\n'
            b'    "dtype": "<u2",\n'
            b'    "fill_value": 0,\n'
            b'    "filters": null,\n'
            b'    "order": "C",\n'
            b'    "shape": [\n'
            b'        3,\n'
            b'        10,\n'
            b'        4320,\n'
            b'        5120\n'
            b'    ],\n'
            b'    "zarr_format": 2\n'
            b'}'
        ),
    })> (FSStore) len=1

And then something fails..

When using previous versions, I think we ended up in the DirectoryStore branch.

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

For the record, fsspec.get_mapper() (which we are currently using) creates a FSMap object, and then it makes sense that we end up in that branch.

I'm not sure of why we would need that store, and cannot use a more standard KVStore or DirectoryStore.

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Additional info: the CI correctly fails, as soon as we switch to zarr 2.3.16 - see for instance

FAILED tests/test_unit_illumination_correction.py::test_illumination_correction[True] - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-tommaso/pytest-151/test_illumination_correction_T0/plate.zarr/B/03/0/1/0/1/0/0'

And see also: https://github.com/fractal-analytics-platform/fractal-tasks-core/actions/runs/3939719186/jobs/6739903447

This means we also have a way to test new implementations, for instance based on DirectoryStore.
From the docs:

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Finally a minimal non-working example:

import os
import shutil
import dask.array as da

x = da.ones((2, 4), chunks=(1, 2))
print(x)

zarrurl = "/tmp/plate_ones.zarr/"
if os.path.isdir(zarrurl):
    shutil.rmtree(zarrurl)

x.to_zarr(zarrurl, dimension_separator="/")

Running this script with zarr 2.13.6 leads to the usual traceback

Traceback (most recent call last):
  File "/home/tommaso/Fractal/fractal-tasks-core/tests/data/mwe.py", line 12, in <module>
    x.to_zarr(zarrurl, dimension_separator="/")
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 2828, in to_zarr
    return to_zarr(self, *args, **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 3591, in to_zarr
    return arr.store(z, lock=False, compute=compute, return_stored=return_stored)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 1752, in store
    r = store([self], [target], **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 1226, in store
    compute_as_if_collection(Array, store_dsk, map_keys, **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/base.py", line 347, in compute_as_if_collection
    return schedule(dsk2, keys, **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/threaded.py", line 89, in get
    results = get_async(
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/local.py", line 511, in get_async
    raise_exception(exc, tb)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/local.py", line 319, in reraise
    raise exc
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/local.py", line 224, in execute_task
    result = _execute_task(task, data)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/core.py", line 119, in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 4260, in store_chunk
    return load_store_chunk(x, out, index, lock, return_stored, False)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/dask/array/core.py", line 4242, in load_store_chunk
    out[index] = x
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/core.py", line 1373, in __setitem__
    self.set_basic_selection(pure_selection, value, fields=fields)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/core.py", line 1468, in set_basic_selection
    return self._set_basic_selection_nd(selection, value, fields=fields)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/core.py", line 1772, in _set_basic_selection_nd
    self._set_selection(indexer, value, fields=fields)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/core.py", line 1844, in _set_selection
    self._chunk_setitems(lchunk_coords, lchunk_selection, chunk_values,
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/core.py", line 2046, in _chunk_setitems
    self.chunk_store.setitems(to_store)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/zarr/storage.py", line 1394, in setitems
    self.map.setitems(values)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/mapping.py", line 116, in setitems
    self.fs.pipe(values)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/spec.py", line 757, in pipe
    self.pipe_file(self._strip_protocol(k), v, **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/spec.py", line 736, in pipe_file
    with self.open(path, "wb", **kwargs) as f:
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/spec.py", line 1106, in open
    f = self._open(
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/implementations/local.py", line 175, in _open
    return LocalFileOpener(path, mode, fs=self, **kwargs)
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/implementations/local.py", line 273, in __init__
    self._open()
  File "/home/tommaso/miniconda3/envs/test/lib/python3.9/site-packages/fsspec/implementations/local.py", line 278, in _open
    self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/plate_ones.zarr/0/0'

There at least three ways of getting the script to work:

  1. Use zarr==2.13.3;
  2. Set dimension_separator=".";
  3. Work with one-dimensional array.

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Let's see if we receive some useful advice on dask/dask#9841.

@tcompa
Copy link
Collaborator Author

tcompa commented Jan 17, 2023

Temporary fix: let's update dask to 2023.1, which works fine with zarr 2.13.6 (see issue on dask repo).

tcompa added a commit that referenced this issue Jan 17, 2023
@tcompa tcompa linked a pull request Jan 17, 2023 that will close this issue
tcompa added a commit that referenced this issue Jan 18, 2023
…underror-in-yokogawa-to-zarr-task

Update zarr and dask (ref #280)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority Current Priorities & Blocking Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants