-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't mix pn.bind with streams in DynamicMaps anymore #6008
Comments
Likely a consequence of the param 2.0 upgrade. As a workaround this should work: import holoviews as hv
import panel as pn
pn.extension()
def make_plot(value, x_range, y_range):
print(value)
print(x_range, y_range)
return hv.Curve([1, 2, 3, 4])
slider = pn.widgets.IntSlider(name='Slider', start=0, end=10)
range_xy = hv.streams.RangeXY()
dmap = hv.DynamicMap(make_plot, streams=[slider.param.value, range_xy])
pn.Column(slider, dmap).servable() |
Thank you @hoxbro for your reply and the PR. I had found this workaround but unfortunately it is limited to one argument called "value". In my real-world app the |
Can you test if the fix in the PR will work for you? |
It does! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
HoloViews 1.18.1
Param 2.0.1
Panel 1.3.4
Description of expected behavior and the observed behavior
I used to be able to wrap a
pn.bind
within a DynamicMap and add astreams
argument like the following:dmap = hv.DynamicMap(pn.bind(function, arg=some_widget), streams=[some_stream])
This is useful for plots driven both by widgets and streams.
But now this causes an error where expected inputs are missing, maybe related to the new Param version.
MRE
In a panel server
Stack traceback and/or browser JavaScript console output
The text was updated successfully, but these errors were encountered: