ome / ome-zarr-py

Implementation of next-generation file format (NGFF) specifications for storing bioimaging data in the cloud.
https://pypi.org/project/ome-zarr
Other
150 stars 53 forks source link

Sparse plate, with "missing" Wells shouldn't throw exceptions #263

Closed will-moore closed 11 months ago

will-moore commented 1 year ago

Reported at https://forum.image.sc/t/napari-napari-ome-zarr-plugin-is-not-registered/78482/21

Since we have a 96-Well plate, we are trying to load a thumbnail for every Well, even if they don't exist in the plate metadata.

Instead, we should check for the existence of a Well before trying to load.

napari "c:\Temp\zarr\w96_A1+A2_test_no_attachment.zarr" --plugin napari-ome-zarr
16:06:34 ERROR Failed to load E/6/0/3
Traceback (most recent call last):
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\mapping.py", line 143, in __getitem__
    result = self.fs.cat(k)
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\spec.py", line 843, in cat
    return self.cat_file(paths[0], **kwargs)
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\spec.py", line 742, in cat_file
    with self.open(path, "rb", **kwargs) as f:
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\spec.py", line 1135, in open
    f = self._open(
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\implementations\local.py", line 183, in _open
    return LocalFileOpener(path, mode, fs=self, **kwargs)
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\implementations\local.py", line 285, in __init__
    self._open()
  File "F:\Documents\miniconda3\envs\ia39\lib\site-packages\fsspec\implementations\local.py", line 290, in _open
    self.f = open(self.path, mode=self.mode)
FileNotFoundError: [Errno 2] No such file or directory: 'c:/Temp/zarr/w96_A1+A2_test_no_attachment.zarr/E/6/0/3/.zarray'
imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/napari-napari-ome-zarr-plugin-is-not-registered/78482/22

sebi06 commented 1 year ago

Thsi is just an idea, what might go wrong here:

I suspect that bioformats2raw is parsing the experiment metadata inside the CZI metadata instead of sticking to what the actual image metadata show. My reasoning for this is:

I am not sure if this is what happens, but at least this could be checked because this would explain why "somebody" still tries to find all the missing images from those wells.

imagesc-bot commented 1 year ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/strange-behavior-of-ome-zarr-created-by-bioformats2raw-from-a-czi-image/85177/2