3个具有相同输入列表的回调,2个被调用,但不是1个。在调试器中,对于第3个通知,执行从输入列表直接跳出函数。任何建议欢迎。。。你知道吗
@app.callback(
dash.dependencies.Output('firstcallback', 'children'),
[dash.dependencies.Input('firstdropdown', 'value'),
dash.dependencies.Input('seconddropdown', 'value')])
def firstgoodcallback(first, second):
print("firstgoodcallback") #prints ok
return u'{} is a reference to {}'.format(first, second)
@app.callback(
dash.dependencies.Output('secondcallback', 'children'),
[dash.dependencies.Input('firstdropdown', 'value'),
dash.dependencies.Input('seconddropdown', 'value')])
def secondgoodcallback(first, second):
print("secondgoodcallback") #prints ok
return u'{} is a second reference to {}'.format(first, second)
@app.callback(
dash.dependencies.Output('thirdcallback', 'children'),
[dash.dependencies.Input('firstdropdown', 'value'),
dash.dependencies.Input('seconddropdown', 'value')])
def set_display_children(first, second):
print("helloWorld") #doesn't get this far
return u'{} is a third reference to {}'.format(first, second)
而且'firstdropdown'
、'seconddropdown'
在启动时都用默认值初始化,并且所有回调都在同一个模块中,该模块也有name==main
保护。谢谢
目前没有回答
相关问题 更多 >
编程相关推荐