Any clues why the imported versions are causing an error? There’s probably another dependency version I’m not aware of?
holoviews version = 1.18.2
panel version = 1.3.8
import numpy as np
import pandas as pd
import panel as pn
import holoviews as hv
print(alt.__version__)
print(hv.__version__)
print(pn.__version__)
# Compute x^2 + y^2 across a 2D grid
x, y = np.meshgrid(range(-5, 5), range(-5, 5))
z = x ** 2 + y ** 2
# Convert this grid to columnar data expected by Altair
source = pd.DataFrame({'x': x.ravel(),
'y': y.ravel(),
'z': z.ravel()})
def foo(x):
print('brush')
#pn.extension()
pn.extension('vega')
#pn.extension()
#hv.extension()
brush = alt.selection_interval(name='brush') # selection of type "interval"
heatmap_brush = alt.Chart(source).mark_rect().encode(
x='x:O',
y='y:O',
color='z:Q',
tooltip=['x:O', 'y:O', 'z:Q']
).add_params(
brush
)
vega_pane = pn.panel(heatmap_brush, debounce=10)
pn.Row(vega_pane, pn.bind(foo, vega_pane.selection.param.brush))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/tmp/ipykernel_12/4125972316.py in <cell line: 27>()
25 print('brush')
26 #pn.extension()
---> 27 pn.extension('vega')
28 #pn.extension()
29 #hv.extension()
~/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.9/lib/python3.9/site-packages/pyviz_comms/__init__.py in __new__(cls, *args, **kwargs)
62 except Exception:
63 pass
---> 64 return param.ParameterizedFunction.__new__(cls, *args, **kwargs)
65
66 @classmethod
~/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.9/lib/python3.9/site-packages/param/parameterized.py in __new__(class_, *args, **params)
4429 inst = class_.instance()
4430 inst.param._set_name(class_.__name__)
-> 4431 return inst.__call__(*args,**params)
4432
4433 def __call__(self,*args,**kw):
~/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.9/lib/python3.9/site-packages/panel/config.py in __call__(self, *args, **params)
846 else:
847 with param.logging_level('ERROR'):
--> 848 hv.plotting.Renderer.load_nb(config.inline)
849 if hasattr(hv.plotting.Renderer, '_render_with_panel'):
850 nb_loaded = True
~/.cache/pypoetry/virtualenvs/python-kernel-OtKFaj5M-py3.9/lib/python3.9/site-packages/holoviews/plotting/renderer.py in load_nb(cls, inline, reloading, enable_mathjax)
651 """
652 if panel_version >= Version('1.0.2'):
--> 653 load_notebook(inline, reloading=reloading, enable_mathjax=enable_mathjax)
654 elif panel_version >= Version('1.0.0'):
655 load_notebook(inline, reloading=reloading)
TypeError: noop_load_notebook() got an unexpected keyword argument 'reloading'