Skip to content
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

Cannot use ipywidgets IntRangeSlider with panel #2943

Open
alejandrosame opened this issue Nov 22, 2021 · 2 comments
Open

Cannot use ipywidgets IntRangeSlider with panel #2943

alejandrosame opened this issue Nov 22, 2021 · 2 comments
Labels
bokeh Request is for change in bokeh type: bug Something isn't correct or isn't working

Comments

@alejandrosame
Copy link

alejandrosame commented Nov 22, 2021

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import panel
>>> import bokeh
>>> import ipywidgets
>>> ipywidgets.__version__
'7.6.5'
>>> bokeh.__version__
'2.4.1'
>>> panel.__version__
'0.12.4'

Description of expected behavior and the observed behavior

I expect to send ipywidgets IntRangeSlider directly to panel and be able to interact with it. Currently, IntRangeSlider does not render and returns a NaN range, without showing any console error.

Complete, minimal, self-contained example code that reproduces the issue

#!/usr/bin/env python

import ipywidgets as widgets
import panel as pn

pn.extension(sizing_mode='stretch_width', comms='ipywidgets')

pn_slider = pn.widgets.IntRangeSlider(
    name='Integer Range Slider',
    start=0, end=10, value=(2, 8), step=2)

ipw_slider = widgets.IntRangeSlider(
    description='Integer Range Slider',
    min=0, max=10, value=[2, 8], step=2)

g = pn.Column(pn_slider, ipw_slider)


g.show()

Stack traceback and/or browser JavaScript console output

[bokeh] Lost websocket 0 connection, 1001 () bokeh.min.js:587:4014
http://localhost:39305/static/extensions/ipywidgets_bokeh/ ipywidgets_bokeh.js:2:208
[bokeh] setting log level to: 'info' bokeh.min.js:184:1360
GEThttp://localhost:39305/favicon.ico
[HTTP/1.1 404 Not Found 1ms]

[bokeh] Websocket connection 0 is now open bokeh.min.js:587:3565
Starting WebSocket: api/kernels/0 ipywidgets_bokeh.js:2:540510
Bokeh items were rendered successfully bokeh.min.js:163:888
[bokeh] document idle at 93 ms

Screenshots or screencasts of the bug in action

image

@philippjfr
Copy link
Member

Updated your example but I can still confirm this errors on 0.12.5 with the following console error:

Uncaught TypeError: Cannot read properties of undefined (reading 'toggleClass')

Probably has to be raised with ipywidgets_bokeh rather than here.

@philippjfr philippjfr added bokeh Request is for change in bokeh type: bug Something isn't correct or isn't working labels Nov 30, 2021
@alejandrosame
Copy link
Author

Thanks for the pointer @philippjfr!

At least one issue in ipywidgets_bokeh mentions this problem (bokeh/ipywidgets_bokeh#22), so I leave it linked here for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bokeh Request is for change in bokeh type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

2 participants