When I run the app, I see a warning message (the program still runs):
dash.exceptions.InvalidCallbackReturnValue: The callback …url.pathname…page_header.children… is a multi-output. Expected the output type to be a list or tuple but got None.
What puzzles me is that this message appears in my console even before the callback is triggered i.e. even before I have pressed any of the above two buttons. I have confirmed that the callback is not triggered when this message appears by debugging.
Am I doing something silly or is it a bug ?
Interestingly, if I add the following two lines to the end of the callback, the warning disappears:
else:
return (no_update, no_update)
Adding the above two lines seems to replace the None with no_update.
Dash fires all callbacks when the app loads, thus your original code did not have a valid return, hence needing the else clause you subsequently added.
However, now I find that the default layout appears but page is constantly refreshing. It refreshes about 20 times or so continuously and then the default layout disappears from the page. However, in the Python console I see that the page is still refreshing even though the default layout has disappeared.
Not sure what’s going on w/o the rest of your code. Have you identified which callback is being triggered?
Also, what happens when if (ctx.triggered and ctx.triggered[0]['value'] != 0) is not satisfied? There is no return value. I would move your else clause to be associated with this vice if trigger_input_id.