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

Getting TypeError: e.store.get is not a function #184

Closed
fercer opened this issue Jul 19, 2024 · 7 comments
Closed

Getting TypeError: e.store.get is not a function #184

fercer opened this issue Jul 19, 2024 · 7 comments

Comments

@fercer
Copy link

fercer commented Jul 19, 2024

Hi vizarr team, thanks for this amazing work!

I just started getting the following error early this week when trying to visualize Zarr files (stored localy or even remotely e.g. from IDR).

ERROR:RPC:Error in method Error: TypeError: e.store.get is not a function
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/imjoy_rpc/rpc.py", line 404, in _wait
    result = await result
  File "/content/vizarr/example/imjoy_plugin.py", line 23, in run
    await viewer.add_image(img)
Exception: Error: TypeError: e.store.get is not a function

The viewer shows, but the image is not being loaded.

I've reproduced the error by cloning the most recent version of vizarr from this repository and following the steps from the IDR example (vizarr/example/IDR_example.ipynb).

Here are the versions of the packages that I'm using:

python: 3.10.12
imjoy: 0.11.20
imjoy_rpc: 0.5.57
zarr: 2.18.2
fsspec: 2023.6.0
@manzt
Copy link
Member

manzt commented Jul 19, 2024

Hi there, thanks for trying out vizarr. I need to update the examples but the preferred way to use vizarr is through the custom Widget (not imJoy) #174 (comment)

@manzt
Copy link
Member

manzt commented Jul 19, 2024

I'll work on updating the examples. In the meantime, you should be able to get started with the following (no need to clone this repo, just pip install vizarr)

from fsspec import get_mapper
import zarr

# Create a remote mapping to the data
url = "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/6001240.zarr/"
store = get_mapper(url)
z_grp = zarr.open(store, mode='r')
z_grp
import vizarr # make sure to pip install vizarr
viewer = vizarr.Viewer()
viewer.add_image(source=z_grp)
viewer

@fercer
Copy link
Author

fercer commented Jul 19, 2024

Thanks for the prompt answer @manzt!

I installed vizarr from pip and used it as normal python package as you suggested, and it works nicely without issues on my PC.

For some reason it is still not loading when used on colab; however, that might be related to a different reason.
Unfortunately the colab notebook does not display any errors, so I can't elaborate on what is failing in the environment.

Thank you!

@manzt
Copy link
Member

manzt commented Jul 19, 2024

hmm, I just tried with the link in the readme. I'm not sure what's happen in google colab:

image

@manzt
Copy link
Member

manzt commented Jul 19, 2024

I installed vizarr from pip and used it as normal python package as you suggested, and it works nicely without issues on my PC.

Glad it's working for you! I needed a kick to update the notebook materials :) #186

@fercer
Copy link
Author

fercer commented Jul 19, 2024

I just tested again in colab and now is working completely.
Probably some issue on the environment not related to vizarr.

For completeness, I tested with zarr images stored remotely from IDR, and stored locally, both worked without issues.

Thanks again for your help!

@fercer fercer closed this as completed Jul 19, 2024
@manzt
Copy link
Member

manzt commented Jul 19, 2024

great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants