ipwidgets can quietly fail if wrapped in an hvPlot component
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
#### Description of expected behavior and the observed behavior
ipwidgets can quietly fail if wrapped in an hvPlot component. There should be some error/warning.
The issue seems to occur if you install JupyterLab in a different environment than the IPython kernel that is being used to run a notebook. The [ipywidgets docs have a fix for this](https://ipywidgets.readthedocs.io/en/stable/user_install.html#:~:text=If%20JupyterLab%20and%20the%20IPython%20kernel%20are%20installed%20in%20different%20environments%20(for%20example%2C%20separate%20environments%20are%20providing%20different%20Python%20kernels)%2C%20then%20the%20installation%20requires%20two%20steps%3A) (See also [this issue](https://github.com/matplotlib/ipympl/issues/112)).
users should be warned in some way if the ipywidgets are not working. Ideally, there would be a warnings about this issue in the hvplot documentation as well as inline in a notebook when the issue occurs.
#### Complete, minimal, self-contained example code that reproduces the issue
Here is a section extracted from the hvplot user guide / interactive.ipynb. It produces no output as seen in the screenshot underneath the code
```
import ipywidgets as ipw
import hvplot.xarray # noqa
import xarray as xr
ds = xr.tutorial.load_dataset('air_temperature')
slider = ipw.IntSlider(description='time', min=0, max=10)
ds.air.interactive(width=800).isel(time=slider)
```

#### Stack traceback and/or browser JavaScript console output
You can see the error if you simply try to render the ipywidget
``` python
import ipywidgets as ipw
slider = ipw.IntSlider(min=0, max=10)
slider
```
``` bash
Error displaying widget: model not found
```

Contributor guide
Assessment
This issue has not been assessed yet.