Open e-wallace opened 2 months ago
This bug is already solved for the upcoming release. See issue #2897 and PR #2898. The issue came up for me, because I wanted to allow callbacks with components in running that were not yet in the layout. The future behavior will be that if surpress_callback_exceptions=True
then no warning is given, and if it is disabled, you will see an error that the component doesn't exist in the layout.
New version is live now. Update to 2.18.0 to get the correct error handling.
Describe your context In the callback definition if there's a typo in the running section, the callback will break but no errors will show.
@callback( output=Output("paragraph_id", "children"), inputs=Input("button_id", "n_clicks"), background=True, running=[ (Output("button-id", "disabled"), True, False), ], )
Describe the bugYou are able to click the button, but it doesn't change colour and go offline. Nothing happens and no errors show.
Logs say the callback succeeded
[2024-08-28 16:37:31,801: INFO/ForkPoolWorker-3] Task long_callback_30e712a6918f1cf3326b54541e42a0453585264e[402c37d9-0d28-46bf-827e-8a8da7c03402] succeeded in 2.0058521699975245s: None
You can reproduce the error with the following code:
app.py
procfile
Expected behavior
You expect to see an error message like "The output ID does not match any of the IDs in the layout".
Screenshots
Here is the error that shows in the browser console logs