Skip to content

Error when displaying in Jupyter notebook #220

Description

@alejoe91

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions