A sample code that trigger some of those issues follow below, seems some state isn’t being cleared out. My second question is: why I cannot plot the same thing twice if I want to do so.
import numpy as np
from bokeh.layouts import column, row
from bokeh.plotting import figure, show
from bokeh.io import output_file
import bokeh.palettes as bp
Let $$ x_i \in (0,2) $$
nx = 41 # Grid points
dx = 2/(nx-1) # Grid interval
nt = 41 # Simulation points
dt = 0.025 # Simulation interval
c = 1 # Wave velocity
Let $$ u = 2 \forall x_i \in 0.5 \leq x \leq 1 $$
u = np.ones([nt,nx])
for n in range(1,nt):
un = u[n-1].copy()
for i in range(1, nx):
u[n][i] = un[i] - c * dt/dx * (un[i] - un[i-1])
p1 = figure(plot_width=400,plot_height=400,x_range=[0,nx],y_range=[0,nt])
p2 = figure(plot_width=400,plot_height=400)
p3 = figure(plot_width=400,plot_height=400)
p = column(row(p1),row(p2,p3))
To trigger the “bug” do:
0. Run the code inside ipython (%run prog.py) and check that is working fine
1. Comment the previous command line
2. Uncomment the next two lines
3. Run the code inside ipython (it will fail about Duplicate edit variable)
4. Undo steps 1 and 2 (now the code is back to original state, it should work fine)
5. Run the code inside ipython (but not… it will fail again with the same error)
6. Close Ipython
7. Run the code again (%run prog.py) now it works. Why?
#p = column(row(p1,pn),row(p2,p3))
Em domingo, 13 de novembro de 2016 15:39:42 UTC-2, Bryan Van de ven escreveu:
In console when I show charts after one run (ie the first execution is successful then when re-running), I get the following error,
duplicate edit variable
I combine 3 simple bar plots via show( row(a,b,c) ).
Should I be clearing any variables? Should I close the charts?
Somehow, somewhere you are putting the same plot in one document twice. It’s hard to say anything more specific without code to inspect or run. In general when asking for help, it’s always advised to attempt to provide code that is relevant to the question you are asking. If you can provide a complete example that duplicates the problem, I’m happy to take a closer look.
A terrible error, kills development time…
I appreciate and empathize that bugs are frustrating, but I also feel compelled to state that this kind of comment is neither constructive not helpful. The error in question was certainly never expected to be one that end-users commonly or ever see. We happened to be mistaken, as it turns out there is a scenario where it crops up. We will work to improve things, as time and resources permit. Certainly no one likes bugs, but Bokeh is a large project, with many users, and only a few devs, all of whom are merely human beings who will make mistakes. The best way to help improve Bokeh for yourself and everyone is to remember that open-source software is a collaboration, and requires your constructive and useful contributions (which are always welcome and appreciated).