I am quite excited about this, thanks for implementing the ome-zarr support. When I tried the extension with you example on MacOS (5.12.4)
>>> slicer.util.loadNodeFromFile("s3://ome-zarr-scivis/v0.5/96x2/marmoset_neurons.ome.zarr", "OMEZarr")
Traceback (most recent call last):
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 498, in open_remote_node
arr = _run(lambda: AsyncArray.open(store._store, path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 100, in _run
return asyncio.run_coroutine_threadsafe(_invoke(), _io_loop()).result()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 98, in _invoke
return await factory()
^^^^^^^^^^^^^^^
zarrista.exceptions.ArrayCreateError: Generic S3 error: Error performing PUT http://169.254.169.254/latest/api/token in 2.635813709s, after 10 retries, max_retries: 10, retry_timeout: 180s - HTTP error: error sending request
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Applications/Slicer.app/Contents/Extensions-34645/OMEZarr/lib/Slicer-5.12/qt-scripted-modules/OMEZarr.py", line 1575, in load
nodes = OMEZarrLogic.loadImage(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/Extensions-34645/OMEZarr/lib/Slicer-5.12/qt-scripted-modules/OMEZarr.py", line 763, in loadImage
multiscales = multiscales or cls.openMultiscales(path)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/Extensions-34645/OMEZarr/lib/Slicer-5.12/qt-scripted-modules/OMEZarr.py", line 378, in openMultiscales
ngff_zarr.from_ome_zarr(source, storage_options=options) if options else ngff_zarr.from_ome_zarr(source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/from_ngff_zarr.py", line 264, in from_ome_zarr
root = _open_root_node(store, version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/from_ngff_zarr.py", line 158, in _open_root_node
return _open_remote_root(store, version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/from_ngff_zarr.py", line 141, in _open_remote_root
node = open_remote_node(store)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 504, in open_remote_node
raise group_error from array_error
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 493, in open_remote_node
group = _run(lambda: AsyncGroup.open(store._store, path))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 100, in _run
return asyncio.run_coroutine_threadsafe(_invoke(), _io_loop()).result()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/ngff_zarr/_remote_reader.py", line 98, in _invoke
return await factory()
^^^^^^^^^^^^^^^
zarrista.exceptions.GroupCreateError: Generic S3 error: Error performing PUT http://169.254.169.254/latest/api/token in 6.812037334s, after 10 retries, max_retries: 10, retry_timeout: 180s - HTTP error: error sending request
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Applications/Slicer.app/Contents/bin/Python/slicer/util.py", line 913, in loadNodeFromFile
raise RuntimeError(errorMessage)
RuntimeError: Failed to load node from file: s3://ome-zarr-scivis/v0.5/96x2/marmoset_neurons.ome.zarr
Error: Loading s3://ome-zarr-scivis/v0.5/96x2/marmoset_neurons.ome.zarr - Failed to read OME-Zarr: Generic S3 error: Error performing PUT http://169.254.169.254/latest/api/token in 6.812037334s, after 10 retries, max_retries: 10, retry_timeout: 180s - HTTP error: error sending request