Hi,
I am trying to change the options from a selection toolbox from a callback using the bokeh server.
My code:
from bokeh.io import curdoc
from bokeh.models import VBox, Select
def update(attrname, old, new):
var1 = select1.value
varA = int(var1) *5.0
varB = int(var1) *3.0
varC = int(var1) *8.0
newVar = [str(varA), str(varB), str(varC)]
select2.set(‘options’, newVar);
categories=[“1”,“2”,“3”]
select1 = Select(title=“Cat1”, value=categories[0], options=categories)
select1.on_change(‘value’, update)
select2 = Select(title=“Cat2”, value="")
layout = VBox(select1,select2)
#add to document
curdoc().add_root(layout)
my error:
set() takes 1 positional argument but 3 were given.
Could someone please tell me the correct way to do this?
Regards,
Rakesh

