Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

widget don't display after an event (Could not create view Error) #188

Open
@madhu-mallisseri

Description

@madhu-mallisseri

I have a notebook (snippet below) which has an ipywidget button. I need to display a checkbox on click of the button. This works as expected in jupyter. When this notebook is deployed to a dashboard server, on click of button, checkbox is not displayed.

notebook:

from ipywidgets import *
from IPython.display import display

def show_widgets():
    c = widgets.Checkbox(
        description='check me',
        value=True,
    )
    display(c)

button = widgets.Button(
    description='Display checkbox'
)
display(button)

def on_button_clicked(b):
    show_widgets()

button.on_click(on_button_clicked)

JS Console error:

Error: Could not create view at new Error (native) at Error.WrappedError (http://...:3000/components/jupyter-js-widgets.js:4065:22) at promiseRejection (http://...:3000/components/jupyter-js-widgets.js:4156:30)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions