Bokeh Error: duplicate edit variable

I am getting error: Bokeh Error: duplicate edit variable and my web page is showing blank. I am getting this on all of my reports including few that I just copied from documentation. But a week ago or so they worked fine. I do not use plotting to more than one plot on any of the reports, should not be any duplicate error. But noticed that it is sometimes opening 2 html pages instead of 1 page, not sure if it is related or not.

I reinstalled bokeh with the command “conda install bokeh” and the error gone for few reports but then it appeared again end started for all reports again.

Hope some one can help. I am using windows 10, 64 bits,

bokeh 0.12.4 py35_0 , python 3.

Here is the one report script that I am running (this is just taken from documenation):

from bokeh.layouts import column

from bokeh.models import CustomJS, ColumnDataSource, Slider

from bokeh.plotting import Figure, output_file, show

output_file(“callback.html”)

x = [x*0.005 for x in range(0, 200)]

y = x

source = ColumnDataSource(data=dict(x=x, y=y))

plot = Figure(plot_width=400, plot_height=400)

plot.line(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)

def callback(source=source, window=None):

data = source.data

f = cb_obj.value

x, y = data[‘x’], data[‘y’]

for i in range(len(x)):

y[i] = window.Math.pow(x[i], f)

source.trigger(‘change’)

slider = Slider(start=0.1, end=4, value=1, step=.1, title=“power”,

callback=CustomJS.from_py_func(callback))

layout = column(slider, plot)

show(layout)

Are you running this script in an interactive session, such as the python repl, ipython or jupyter notebook? The reason I ask is because the duplicate edit error is caused by inserting the same plot into a document twice.

There is nothing like that in the code as it is shown, but it is pretty easy to insert the same plot into a document twice in an interactive session. All you would have to do is run everything in the example code and then run the last two lines of the script a second time to raise this error.

This error will persist within an interactive session once it is raised. This is because the error is caused by the duplicate plots within the document object associated with the output.

You can either fetch and clear the document:

from [bokeh.io](http://bokeh.io) import curdoc
curdoc().clear()

Or, restart your interactive session.

···

On Sun, Mar 26, 2017 at 1:21 PM, [email protected] wrote:

I am getting error: Bokeh Error: duplicate edit variable and my web page is showing blank. I am getting this on all of my reports including few that I just copied from documentation. But a week ago or so they worked fine. I do not use plotting to more than one plot on any of the reports, should not be any duplicate error. But noticed that it is sometimes opening 2 html pages instead of 1 page, not sure if it is related or not.

I reinstalled bokeh with the command “conda install bokeh” and the error gone for few reports but then it appeared again end started for all reports again.

Hope some one can help. I am using windows 10, 64 bits,

bokeh 0.12.4 py35_0 , python 3.

Here is the one report script that I am running (this is just taken from documenation):

from bokeh.layouts import column

from bokeh.models import CustomJS, ColumnDataSource, Slider

from bokeh.plotting import Figure, output_file, show

output_file(“callback.html”)

x = [x*0.005 for x in range(0, 200)]

y = x

source = ColumnDataSource(data=dict(x=x, y=y))

plot = Figure(plot_width=400, plot_height=400)

plot.line(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)

def callback(source=source, window=None):

data = source.data

f = cb_obj.value

x, y = data[‘x’], data[‘y’]

for i in range(len(x)):

y[i] = window.Math.pow(x[i], f)

source.trigger(‘change’)

slider = Slider(start=0.1, end=4, value=1, step=.1, title=“power”,

callback=CustomJS.from_py_func(callback))

layout = column(slider, plot)

show(layout)

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8f491f2c-49c0-4065-b02e-16804cf1dee4%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks a lot. It worked. There was one script actually that was plotting two times in one document, after this script run, all other scripts were stopping to work. And Fetching and clear document was working fine - it allowed to run after failed document.

···

On Sunday, March 26, 2017 at 3:54:36 PM UTC-5, [email protected] wrote:

I am getting error: Bokeh Error: duplicate edit variable and my web page is showing blank. I am getting this on all of my reports including few that I just copied from documentation. But a week ago or so they worked fine. I do not use plotting to more than one plot on any of the reports, should not be any duplicate error. But noticed that it is sometimes opening 2 html pages instead of 1 page, not sure if it is related or not.

I reinstalled bokeh with the command “conda install bokeh” and the error gone for few reports but then it appeared again end started for all reports again.

Hope some one can help. I am using windows 10, 64 bits,

bokeh 0.12.4 py35_0 , python 3.

Here is the one report script that I am running (this is just taken from documenation):

from bokeh.layouts import column

from bokeh.models import CustomJS, ColumnDataSource, Slider

from bokeh.plotting import Figure, output_file, show

output_file(“callback.html”)

x = [x*0.005 for x in range(0, 200)]

y = x

source = ColumnDataSource(data=dict(x=x, y=y))

plot = Figure(plot_width=400, plot_height=400)

plot.line(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)

def callback(source=source, window=None):

data = source.data

f = cb_obj.value

x, y = data[‘x’], data[‘y’]

for i in range(len(x)):

y[i] = window.Math.pow(x[i], f)

source.trigger(‘change’)

slider = Slider(start=0.1, end=4, value=1, step=.1, title=“power”,

callback=CustomJS.from_py_func(callback))

layout = column(slider, plot)

show(layout)

Glad I could help!

···

On Mon, Mar 27, 2017 at 6:51 PM, [email protected] wrote:

Thanks a lot. It worked. There was one script actually that was plotting two times in one document, after this script run, all other scripts were stopping to work. And Fetching and clear document was working fine - it allowed to run after failed document.

On Sunday, March 26, 2017 at 3:54:36 PM UTC-5, [email protected] wrote:

I am getting error: Bokeh Error: duplicate edit variable and my web page is showing blank. I am getting this on all of my reports including few that I just copied from documentation. But a week ago or so they worked fine. I do not use plotting to more than one plot on any of the reports, should not be any duplicate error. But noticed that it is sometimes opening 2 html pages instead of 1 page, not sure if it is related or not.

I reinstalled bokeh with the command “conda install bokeh” and the error gone for few reports but then it appeared again end started for all reports again.

Hope some one can help. I am using windows 10, 64 bits,

bokeh 0.12.4 py35_0 , python 3.

Here is the one report script that I am running (this is just taken from documenation):

from bokeh.layouts import column

from bokeh.models import CustomJS, ColumnDataSource, Slider

from bokeh.plotting import Figure, output_file, show

output_file(“callback.html”)

x = [x*0.005 for x in range(0, 200)]

y = x

source = ColumnDataSource(data=dict(x=x, y=y))

plot = Figure(plot_width=400, plot_height=400)

plot.line(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)

def callback(source=source, window=None):

data = source.data

f = cb_obj.value

x, y = data[‘x’], data[‘y’]

for i in range(len(x)):

y[i] = window.Math.pow(x[i], f)

source.trigger(‘change’)

slider = Slider(start=0.1, end=4, value=1, step=.1, title=“power”,

callback=CustomJS.from_py_func(callback))

layout = column(slider, plot)

show(layout)

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/3ef691a3-94d9-4dc1-94c7-8ad5b508245b%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.