Skip to content
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

Should mention callback_context in the error message about combining multiple outputs into a single callback #1141

Open
chriddyp opened this issue Mar 2, 2020 · 2 comments

Comments

@chriddyp
Copy link
Member

chriddyp commented Mar 2, 2020

dash.exceptions.DuplicateCallbackOutput: 
You have already assigned a callback to the output
with ID "column-graph" and property "figure". An output can only have
a single callback function. Try combining your inputs and
callback functions together into one function.

Users run into this issue for two main reasons:

  1. They copied and pasted a previous callback, and now need to update the IDs
  2. They want to update an output conditionally based off a certain input changing

For 2, they need to use callback_context and triggered. We should tell them that in this error message.

@alexcjohnson
Copy link
Contributor

re: (2) See also #1054 Trigger inputs

@ToadRider
Copy link

I was going to approach this error message but it seems like this may have been already dealt with or made unnecessary by Dash 2.0

If this is still needed I would be happy to update the error message as my team's app uses callback_context heavily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants