-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[BUG] Long Callbacks: Raising Error Causes Infinite Loop (Including PreventUpdate) #1821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
我遇见了同样的问题,无法正常使用,请求解决方案,我使用案例文档案例也出现了同样的问题 代码如下: celery_app = Celery( app = dash.Dash(name, long_callback_manager=long_callback_manager) app.layout = html.Div( @app.long_callback( if name == "main": |
I have a similar problem, I click the button which will fire a long_callback, when the long_callback is finished, it will be fired again. A infinite loop |
If the callback takes longer than 1000ms to download to the browser, it will continuously loop. In the dash.py file, there is a hardcoded setting for interval_time. Try setting it to 10000ms instead, that fixed my issue. |
Environment
Describe the bug
If an error is raised within a long callback, an infinite loop of re-raising this error is triggered, as a new process tries again and again
This is triggered by the
_long_callback_interval_1.n_intervals
propertyExpected behavior
The error would be handled like with normal callbacks, and the long callback wouldn't be called by new processes
Minimum Reproducible Example
In the above example, can safely click the button once, then on the second click raising
PreventUpdate
causes the infinite loopWith logged messages of:
The text was updated successfully, but these errors were encountered: