hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Interactive examples arn't updated on the documentation page

Open mosc9575 opened this issue 8 months ago • 0 comments

I was reading the docs for an example using xarray and I found

  • https://hvplot.holoviz.org/user_guide/Gridded_Data.html#n-d-plots
  • https://tutorial.xarray.dev/intermediate/hvplot.html#animations

On both pages the examples with a slider or other interactive widgets don't update.

interactive_example

Therefor I was running the example with the latest versions of all needed packages on my local machine. The initial plot is created but I also get an error message.

Technical details #### software version info Python version : 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:40:50) [MSC v.1937 64 bit (AMD64)] IPython version : 8.22.2 Tornado version : 6.4 Holoviews version : 1.18.3 HVPlot version : 0.10.0 Pandas version : 2.1.0 Panel version : 1.4.4 XArray version : 2024.5.0 Bokeh version : 3.4.1 BokehJS static path : C:\Users\Moritz\anaconda3\envs\bkdev\Lib\site-packages\bokeh\server\static node.js version : v20.9.0 npm version : 10.5.0 jupyter_bokeh version : (not installed) Operating system : Windows-10-10.0.19045-SP0

minimal example

import cartopy.crs as ccrs
import hvplot.xarray
import xarray as xr

ds = xr.tutorial.open_dataset("air_temperature.nc")
# set constant colorbar limits
ds.air.hvplot(
    groupby="time",  # adds a widget for time
    clim=(250, 295),  # sets colormap limits
    widget_type="scrubber",
    widget_location="bottom",
)

Stack traceback

Traceback (most recent call last):
  File "C:\Users\Moritz\anaconda3\envs\bkdev\Lib\site-packages\pyviz_comms\__init__.py", line 340, in _handle_msg
    self._on_msg(msg)
  File "C:\Users\Moritz\anaconda3\envs\bkdev\Lib\site-packages\panel\viewable.py", line 469, in _on_msg
    patch = manager.assemble(msg)
            ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Moritz\anaconda3\envs\bkdev\Lib\site-packages\panel\models\comm_manager.py", line 29, in assemble
    msg_obj = cls(header, msg['metadata'], msg['content'])
                                           ~~~^^^^^^^^^^^
KeyError: 'content'

Screenshots or screencasts of the bug in action

grafik

mosc9575 avatar Jun 03 '24 12:06 mosc9575