question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plot becomes unresponsive when button widget is appended to layout

See original GitHub issue

Hi,

I have a problem when appending Button widgets to a VBox in a nested layout.

Python: 2.7.12 64-bit Bokeh Version: 0.12.4 Browser: Chrome & Edge OS: Windows 10

The below code reproduces the problem. When the add button is pressed the new Button widget is displayed, however the plot figure stops updating or responding. A small graphics glitch also occurs on the title of the plot. No console or browser errors are reported.

import numpy as np

from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure

# Set up data
x = np.linspace(0, 4*np.pi, 200)
y = np.sin(x)
source = ColumnDataSource(data=dict(x=x, y=y))

# Set up plot
plot = figure()

plot.line('x', 'y', source=source)

# Problem Code:
from bokeh.models.widgets import Button
from bokeh.models.layouts import VBox

button = Button(label="Add")
vbox = VBox(children=[button])

def create_button():
    button = Button(label=str(len(vbox.children)))
    vbox.children.append(button)

button.on_click(create_button)

curdoc().add_root(row(vbox, plot))
curdoc().title = "Sliders"

Thanks in advance for any help on this.

Regards, Simon

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Apr 28, 2017

Adding to 0.12.6 as part of overall layout effort

0reactions
bryevdvcommented, May 8, 2017

Closing, since the “unresponsinve” part has been fixed in recent work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matplotlib widget button unresponsive after first click and call ...
I am setting up a class that creates a simple XY plot of a line with some markers (X,Y). The idea is to...
Read more >
Common Flutter errors
Introduction. This page explains several frequently-encountered Flutter framework errors and gives suggestions on how to resolve them.
Read more >
Multithreading PyQt5 applications with QThreadPool
To your user the application will appear to be unresponsive ... the button the counter stops ticking and your application freezes entirely.
Read more >
How to Build a Python GUI Application With wxPython
In this step-by-step tutorial, you'll learn how to create a cross-platform graphical user interface (GUI) using Python and the wxPython toolkit.
Read more >
Fixed issues in InDesign - Adobe Support
InDesign hangs due to issues with long footnotes. ... The widget to change Variable Fonts design axes gets disabled on opening the Font...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found