If I make a callback chain where a final output depends on an input via multiple paths, a PreventUpdate on one of those paths can intermittently prevent the final callback from ever firing.
importdashimportdash_core_componentsasdccimportdash_html_componentsashtmlfromdash.dependenciesimportInput, Outputfromdash.exceptionsimportPreventUpdateapp=dash.Dash(__name__)
app.layout=html.Div([
dcc.Input(id='a', value="x"),
html.Div('b', id='b'),
html.Div('c', id='c'),
html.Div(id='out')
])
@app.callback(Output("out", "children"), [Input("a", "value"), Input("b", "children"), Input("c", "children")])defset_out(a, b, c):
print("out")
return"{}/{}/{}".format(a, b, c)
@app.callback(Output("b", "children"), [Input("a", "value")])defset_b(a):
print("b")
raisePreventUpdate@app.callback(Output("c", "children"), [Input("a", "value")])defset_c(a):
print("c")
returnaif__name__=="__main__":
app.run_server(debug=True)Both on initial load and later as you type in the input box, sometimes you'll see the last line correctly concatenating the three lines before it, sometimes it lags behind. I don't notice a pattern, this happens anywhere from about a quarter to three quarters of the time.
I'll try to sort this out along with wildcards #475
If I make a callback chain where a final output depends on an input via multiple paths, a
PreventUpdateon one of those paths can intermittently prevent the final callback from ever firing.Both on initial load and later as you type in the input box, sometimes you'll see the last line correctly concatenating the three lines before it, sometimes it lags behind. I don't notice a pattern, this happens anywhere from about a quarter to three quarters of the time.
I'll try to sort this out along with wildcards #475