Skip to content

Cannot use ipywidgets IntRangeSlider with panel #2943

@alejandrosame

Description

@alejandrosame

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bokehRequest is for change in bokeh

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions