navis icon indicating copy to clipboard operation
navis copied to clipboard

The MiCrONS Datasets tutorial

Open aquineuro opened this issue 2 years ago • 10 comments

I followed the instructions from https://navis.readthedocs.io/en/latest/source/tutorials/microns_tut.html and I got the following error when I try to promp the content of the variable "inh". Please could you help me or tell me where I should look like for an answer. Thanks a lot. Sébastien

Traceback (most recent call last):
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\IPython\core\interactiveshell.py", line 3437, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-20-2830aab9af73>", line 2, in <module>
    inh = mi.fetch_neurons(inh_ids, lod=2, with_synapses=False)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\navis\interfaces\microns.py", line 180, in fetch_neurons
    vol = get_cloudvol(url)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\navis\interfaces\microns.py", line 82, in get_cloudvol
    return cv.CloudVolume(url, cache=cache, use_https=True, progress=False)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\cloudvolume.py", line 228, in __new__
    return REGISTERED_PLUGINS[path.format](**kwargs)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\datasource\precomputed\__init__.py", line 99, in create_precomputed
    mesh = PrecomputedMeshSource(meta, cache_service, config, readonly)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\datasource\precomputed\mesh\__init__.py", line 17, in __new__
    mesh_meta = PrecomputedMeshMetadata(meta, cache)
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\datasource\precomputed\mesh\metadata.py", line 17, in __init__
    self.info = self.fetch_info()
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\datasource\precomputed\mesh\metadata.py", line 71, in fetch_info
    info = self.cache.download_json(self.meta.join(self.mesh_path, 'info'))
  File "C:\Users\sebas\anaconda3\envs\test\lib\site-packages\cloudvolume\cacheservice.py", line 343, in download_json
    res = res[path]
KeyError: 'mesh/info'

aquineuro avatar Dec 23 '21 17:12 aquineuro

This error originates from the cloud-volume package which navis uses to fetch meshes, etc. from MICRoNS datasets. It looks like it's failing to read the meta data when first initialising the connection.

I just tried running it on my machine and it works just fine. Two things for you to try/report back on:

  1. Restart your Python session and try again - maybe the backend for the MICrONS data had a temporary hiccup.
  2. Make sure you have the most up-to-date version of cloud-volume (I tried with both the most recent 7.0.0 and an earlier 6.1.0.

Let me know if one of the two works. Otherwise we'll have to dig deeper.

schlegelp avatar Dec 23 '21 18:12 schlegelp

Thanks for answering quickly, I appreciate!

  1. I restarted my ipython
  2. I have the version 7.0.0 of cloud-volume

But still I can't fetch the data, is there any authentification I could have missed or did badly ?

Thanks again. Sébastien

aquineuro avatar Dec 23 '21 21:12 aquineuro

Mhm.... that's strange. Could you perhaps try running this:

>>> from cloudvolume import CloudVolume
>>> vol = CloudVolume('precomputed://gs://iarpa_microns/minnie/minnie65/seg', cache=True, use_https=True)

See if that throws the same error?

schlegelp avatar Dec 23 '21 22:12 schlegelp

Yes I got the same error.

aquineuro avatar Dec 23 '21 23:12 aquineuro

I am working on windows 10.

aquineuro avatar Dec 23 '21 23:12 aquineuro

If I do this ; vol = CloudVolume('precomputed://gs://iarpa_microns/minnie/minnie65/seg') I don't get an error

aquineuro avatar Dec 23 '21 23:12 aquineuro

It's the "cache=True" argument which is causing the error

aquineuro avatar Dec 23 '21 23:12 aquineuro

Ah OK. I can push a workaround for that issue to navis but will also open an issue in the cloud-volume repo. Will keep you posted here.

schlegelp avatar Dec 24 '21 00:12 schlegelp

Thank you very much .

aquineuro avatar Dec 24 '21 09:12 aquineuro

FYI: this should be fixed if you update to the newest version of cloud-volume.

schlegelp avatar Feb 24 '22 14:02 schlegelp

Closing assuming this is fixed.

schlegelp avatar Aug 04 '23 09:08 schlegelp