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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
In dash==2.18.0, the number of no_update returned must match the number of outputs. This is not true in earlier versions of Dash.
dash==2.18.0
no_update
This can be resolved by making no_update match but is a regression.
Consider:
import dash from dash import html, dcc, Input, Output, no_update # Initialize the Dash app app = dash.Dash(__name__) # Define the layout app.layout = html.Div( [ dcc.Input(id="input-box", type="text", value=""), html.Button("Submit", id="button"), html.Div(id="output-1", children="Output 1 will be displayed here"), html.Div(id="output-2", children="Output 2 will be displayed here"), ] ) # Callback with two outputs @app.callback( Output("output-1", "children"), Output("output-2", "children"), Input("button", "n_clicks"), Input("input-box", "value"), ) def update_outputs(n_clicks, value): if n_clicks is None: return no_update return "Hello", "world!" # Run the app if __name__ == "__main__": app.run_server(debug=True)
Dash 2.18
Dash 2.17
The text was updated successfully, but these errors were encountered:
@ndrezn Thanks for fixing this! I was wondering why in our apps we were receiving errors for this component.
Sorry, something went wrong.
Does this replace the old sintax "PreventUpdate"?
@leo-smi no, no relation to PreventUpdate.
PreventUpdate
Thank you. Saw here that one is only for one output and other for all outputs...
T4rk1n
Successfully merging a pull request may close this issue.
In
dash==2.18.0
, the number ofno_update
returned must match the number of outputs. This is not true in earlier versions of Dash.This can be resolved by making
no_update
match but is a regression.Consider:
Dash 2.18
![Screenshot 2024-09-05 at 1 37 26 PM](https://private-user-images.githubusercontent.com/38958867/364887581-8a802c4a-9cdf-405b-84d0-af9bcd2759d6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTE0ODcsIm5iZiI6MTczODk5MTE4NywicGF0aCI6Ii8zODk1ODg2Ny8zNjQ4ODc1ODEtOGE4MDJjNGEtOWNkZi00MDViLTg0ZDAtYWY5YmNkMjc1OWQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA1MDYyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkMjllMzM4ZjFiYzAzNTE5OWE2NTM4MjUwNzA0MTlmYThiYjA2ZWM0OWU3NGZkNmQ5YTY3ZGUwZDcxYTM5ZjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EDQk25OQ2xjNdyjQyykgUWZKAbYEWrv0h9kgkcuidBw)
Dash 2.17
![Screenshot 2024-09-05 at 1 37 44 PM](https://private-user-images.githubusercontent.com/38958867/364887627-20c4d4db-8323-42fc-8d9f-2452095dcf8a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5OTE0ODcsIm5iZiI6MTczODk5MTE4NywicGF0aCI6Ii8zODk1ODg2Ny8zNjQ4ODc2MjctMjBjNGQ0ZGItODMyMy00MmZjLThkOWYtMjQ1MjA5NWRjZjhhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA1MDYyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzMzM4NTk4NTRlOWM0ODljZDcyZDBkZDQ3MzVhZmU1YzRkMjgzMGFlOGVlNjRkZGY0YjQ4Yjk2NDlkYzY4MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.SW2IJSg5ByeLlb3CCZ6Wnfs5W37EhTuR73TVZ958BVc)
The text was updated successfully, but these errors were encountered: