holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.3k stars 365 forks source link

Error rendering documentation site #1151

Closed brl0 closed 1 year ago

brl0 commented 1 year ago

This page failed to render properly: https://datashader.org/getting_started/Interactivity.html

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/IPython/core/formatters.py:972, in MimeBundleFormatter.__call__(self, obj, include, exclude)
    969     method = get_real_method(obj, self.print_method)
    971     if method is not None:
--> 972         return method(include=include, exclude=exclude)
    973     return None
    974 else:

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/core/dimension.py:1293, in Dimensioned._repr_mimebundle_(self, include, exclude)
   1286 def _repr_mimebundle_(self, include=None, exclude=None):
   1287     """
   1288     Resolves the class hierarchy for the class rendering the
   1289     object using any display hooks registered on Store.display
   1290     hooks.  The output of all registered display_hooks is then
   1291     combined and returned.
   1292     """
-> 1293     return Store.render(self)

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/core/options.py:1426, in Store.render(cls, obj)
   1424 data, metadata = {}, {}
   1425 for hook in hooks:
-> 1426     ret = hook(obj)
   1427     if ret is None:
   1428         continue

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/ipython/display_hooks.py:277, in pprint_display(obj)
    275 if not ip.display_formatter.formatters['text/plain'].pprint:
    276     return None
--> 277 return display(obj, raw_output=True)

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/ipython/display_hooks.py:250, in display(obj, raw_output, **kwargs)
    248 elif isinstance(obj, (Layout, NdLayout, AdjointLayout)):
    249     with option_state(obj):
--> 250         output = layout_display(obj)
    251 elif isinstance(obj, (HoloMap, DynamicMap)):
    252     with option_state(obj):

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/ipython/display_hooks.py:141, in display_hook.<locals>.wrapped(element)
    139 try:
    140     max_frames = OutputSettings.options['max_frames']
--> 141     mimebundle = fn(element, max_frames=max_frames)
    142     if mimebundle is None:
    143         return {}, {}

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/ipython/display_hooks.py:215, in layout_display(layout, max_frames)
    212     max_frame_warning(max_frames)
    213     return None
--> 215 return render(layout)

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/ipython/display_hooks.py:68, in render(obj, **kwargs)
     65 if renderer.fig == 'pdf':
     66     renderer = renderer.instance(fig='png')
---> 68 return renderer.components(obj, **kwargs)

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/plotting/renderer.py:399, in Renderer.components(self, obj, fmt, comm, **kwargs)
    397 if embed or config.comms == 'default':
    398     return self._render_panel(plot, embed, comm)
--> 399 return self._render_ipywidget(plot)

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/holoviews/plotting/renderer.py:420, in Renderer._render_ipywidget(self, plot)
    418 def _render_ipywidget(self, plot):
    419     # Handle rendering object as ipywidget
--> 420     widget = ipywidget(plot, combine_events=True)
    421     if hasattr(widget, '_repr_mimebundle_'):
    422         return widget._repr_mimebundle_(), {}

File /usr/share/miniconda/envs/test-environment/lib/python3.8/site-packages/panel/io/notebook.py:384, in ipywidget(obj, **kwargs)
    367 def ipywidget(obj: Any, **kwargs: Any):
    368     """
    369     Returns an ipywidget model which renders the Panel object.
    370 
   (...)
    382     Returns an ipywidget model which renders the Panel object.
    383     """
--> 384     from jupyter_bokeh.widgets import BokehModel
    386     from ..pane import panel
    387     model = panel(obj, **kwargs).get_root()

ModuleNotFoundError: No module named 'jupyter_bokeh'

Screenshots or screencasts of the bug in action

ianthomas23 commented 1 year ago

Thanks @brl0. This was a bug in panel that was fixed in https://github.com/holoviz/panel/pull/4137. The easiest solution is probably to do a dev release of panel and rebuild the docs.

ianthomas23 commented 1 year ago

The docs now render correctly. Fix was in PR #1152.