-
Notifications
You must be signed in to change notification settings - Fork 52
Description
This website lists open access Zarr and OME-Zarr datasets: https://idr.github.io/ome-ngff-samples/
I have tried to open these two files:
- 9846152.zarr (Zarr v0.4, validator with structure)
- ExpA_VIP_ASLM_on.zarr (Zarr v0.5, validator with structure)
import cloudvolume
url = "zarr://https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr/"
url = "zarr://https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.5/idr0066/ExpA_VIP_ASLM_on.zarr/"
vol = cloudvolume.CloudVolume(url, parallel=True, progress=True, use_https=True)
print(vol.shape)The first file gives the following error:
Traceback (most recent call last):
File "/home/ucemm12/test_repos/cloud-volume-zarr/test_public_zarr.py", line 6, in
vol = cloudvolume.CloudVolume(url, parallel=True, progress=True, use_https=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/cloudvolume.py", line 250, in new
return init(cloudpath)
^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/cloudvolume.py", line 243, in init
return REGISTERED_PLUGINSpath.format
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/init.py", line 47, in create_zarr
meta = ZarrMetadata(cloudpath, config=config, cache=cache, info=info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 50, in init
self.info = self.fetch_info()
^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 471, in fetch_info
return self.zarr_to_info(self.zarrays, self.zattrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 399, in zarr_to_info
base_res = self.spatial_resolution_in_nm(0, zattrs, zarrays)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 133, in spatial_resolution_in_nm
scale_factors[2] = unit2factor(axis["unit"])
~~~~^^^^^^^^
KeyError: 'unit'
And the second one:
Traceback (most recent call last):
File "/home/ucemm12/test_repos/cloud-volume-zarr/test_public_zarr.py", line 6, in
vol = cloudvolume.CloudVolume(url, parallel=True, progress=True, use_https=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/cloudvolume.py", line 258, in new
raise err
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/cloudvolume.py", line 250, in new
return init(cloudpath)
^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/cloudvolume.py", line 243, in init
return REGISTERED_PLUGINSpath.format
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/init.py", line 47, in create_zarr
meta = ZarrMetadata(cloudpath, config=config, cache=cache, info=info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 50, in init
self.info = self.fetch_info()
^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 471, in fetch_info
return self.zarr_to_info(self.zarrays, self.zattrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ucemm12/test_repos/cloud-volume-zarr/.venv/lib/python3.12/site-packages/cloudvolume/datasource/zarr/metadata.py", line 397, in zarr_to_info
raise exceptions.InfoUnavailableError()
cloudvolume.exceptions.InfoUnavailableError
Maybe related to #651?
Note that it worked on a Google Cloud Storage bucket where I have private data as OME-Zarr.