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

Error when displaying in Jupyter notebook #220

Open
alejoe91 opened this issue Jul 20, 2023 · 1 comment
Open

Error when displaying in Jupyter notebook #220

alejoe91 opened this issue Jul 20, 2023 · 1 comment

Comments

@alejoe91
Copy link
Collaborator

Hi @magland @jsoules

Related to flatironinstitute/kachery-cloud#22, when generating a view in Jupyter and running it in a jupyter cell (aka display(view)), an error related to figurl-jupyter is triggered.

Can you either update figurl-jupyter or remove the display option here?

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
File ~/anaconda3/envs/si/lib/python3.9/site-packages/IPython/core/formatters.py:921, in IPythonDisplayFormatter.__call__(self, obj)
    919 method = get_real_method(obj, self.print_method)
    920 if method is not None:
--> 921     method()
    922     return True

File ~/anaconda3/envs/si/lib/python3.9/site-packages/sortingview/views/View.py:120, in View._ipython_display_(self)
    118 def _ipython_display_(self):
    119     from IPython.display import display
--> 120     ipywidget = self.jupyter(height=self._height)
    121     self._set_jupyter_widget(ipywidget)
    122     display(ipywidget)

File ~/anaconda3/envs/si/lib/python3.9/site-packages/sortingview/views/View.py:100, in View.jupyter(self, height)
     98 if height is None:
     99     height = self._height
--> 100 import figurl_jupyter as fj
    101 url = self.url(label='jupyter', local=True, electron=False, listen_port=None)
    102 a = _parse_figurl_url(url)

File ~/anaconda3/envs/si/lib/python3.9/site-packages/figurl_jupyter/__init__.py:7
      1 #!/usr/bin/env python
      2 # coding: utf-8
      3 
      4 # Copyright (c) Jeremy Magland.
      5 # Distributed under the terms of the Modified BSD License.
----> 7 from .FigurlFigure import FigurlFigure
      8 from ._version import __version__, version_info
     10 def _jupyter_labextension_paths():

File ~/anaconda3/envs/si/lib/python3.9/site-packages/figurl_jupyter/FigurlFigure.py:17
     15 import kachery_cloud as kcl
     16 from ._frontend import module_name, module_version
---> 17 from kachery_cloud.TaskBackend.TaskBackend import TaskHandler
     18 from kachery_cloud._json_stringify_deterministic import _json_stringify_deterministic
     19 from kachery_cloud._serialize import _serialize

ModuleNotFoundError: No module named 'kachery_cloud.TaskBackend'

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
File ~/anaconda3/envs/si/lib/python3.9/site-packages/IPython/core/formatters.py:973, in MimeBundleFormatter.__call__(self, obj, include, exclude)
    970     method = get_real_method(obj, self.print_method)
    972     if method is not None:
--> 973         return method(include=include, exclude=exclude)
    974     return None
    975 else:

File ~/anaconda3/envs/si/lib/python3.9/site-packages/sortingview/views/View.py:113, in View._repr_mimebundle_(self, **kwargs)
    112 def _repr_mimebundle_(self, **kwargs):
--> 113     ipywidget = self.jupyter(height=self._height)
    114     data = ipywidget._repr_mimebundle_(**kwargs)
    115     self._set_jupyter_widget(ipywidget)

File ~/anaconda3/envs/si/lib/python3.9/site-packages/sortingview/views/View.py:100, in View.jupyter(self, height)
     98 if height is None:
     99     height = self._height
--> 100 import figurl_jupyter as fj
    101 url = self.url(label='jupyter', local=True, electron=False, listen_port=None)
    102 a = _parse_figurl_url(url)

File ~/anaconda3/envs/si/lib/python3.9/site-packages/figurl_jupyter/__init__.py:7
      1 #!/usr/bin/env python
      2 # coding: utf-8
      3 
      4 # Copyright (c) Jeremy Magland.
      5 # Distributed under the terms of the Modified BSD License.
----> 7 from .FigurlFigure import FigurlFigure
      8 from ._version import __version__, version_info
     10 def _jupyter_labextension_paths():

File ~/anaconda3/envs/si/lib/python3.9/site-packages/figurl_jupyter/FigurlFigure.py:17
     15 import kachery_cloud as kcl
     16 from ._frontend import module_name, module_version
---> 17 from kachery_cloud.TaskBackend.TaskBackend import TaskHandler
     18 from kachery_cloud._json_stringify_deterministic import _json_stringify_deterministic
     19 from kachery_cloud._serialize import _serialize

ModuleNotFoundError: No module named 'kachery_cloud.TaskBackend'
@magland
Copy link
Owner

magland commented Jul 20, 2023

@alejoe91 I disabled jupyter in #221.

When you have a chance, could you test the main branch to see that it now works properly? Then I will push to pypi.

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