We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
dash 2.18.2 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0
if frontend related, tell us your Browser, Version and OS
Describe the bug
This basic code inspired from the documentation fails:
import time from dash import Dash, html, Output, Input from dash.long_callback import DiskcacheLongCallbackManager import diskcache cache = diskcache.Cache("./cache") long_callback_manager = DiskcacheLongCallbackManager(cache) app = Dash() app.layout = html.Div([ html.Div([ html.P(id="paragraph_id", children=["Button not clicked"]), html.Progress(id="progress_bar"), ]), html.Button(id='button_id', children="Run Job!") ]) @app.callback( output=[Output("paragraph_id", "children")], inputs=[Input("button_id", "n_clicks")], progress=[Output("progress_bar", ("value", "max"))], prevent_initial_call=True, background=True, manager=long_callback_manager ) def callback(set_progress, n_clicks): total = 10 for i in range(total): time.sleep(0.5) set_progress((str(i + 1), str(total))) return [f"Clicked {n_clicks} times"] if __name__ == "__main__": app.run_server(debug=True)
with this error:
NameError: name 'time' is not defined
It seems that Dash creates a new python process in the background to execute the long callback without importing all the packages.
Expected behavior
Dash should handle long callbacks with threading or other mechanisms to avoid these issues, or explain in the documentation how to overcome them.
Screenshots
If applicable, add screenshots or screen recording to help explain your problem.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
belowif frontend related, tell us your Browser, Version and OS
Describe the bug
This basic code inspired from the documentation fails:
with this error:
It seems that Dash creates a new python process in the background to execute the long callback without importing all the packages.
Expected behavior
Dash should handle long callbacks with threading or other mechanisms to avoid these issues, or explain in the documentation how to overcome them.
Screenshots
If applicable, add screenshots or screen recording to help explain your problem.
The text was updated successfully, but these errors were encountered: