[go: nahoru, domu]

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

[BUG] Wildcard callbacks during app initialization #1247

Open
Marc-Andre-Rivet opened this issue May 14, 2020 · 0 comments
Open

[BUG] Wildcard callbacks during app initialization #1247

Marc-Andre-Rivet opened this issue May 14, 2020 · 0 comments

Comments

@Marc-Andre-Rivet
Copy link
Contributor

Using dash==1.12.0

Looking at the dash-renderer test cbmo003(https://github.com/plotly/dash/blob/dev/tests/integration/callbacks/test_missing_outputs.py#L187), the initialization behavior seems to be incorrect.

The callbacks are:
cb1. items.n_clicks -> (content1.children, content2.children) , children of content1 are of shape {i: number} , children of content2 are of shape {j: number}
cb2. values.n_clicks -> ({i:ALL}.children, {j:ALL}.children)
cb3. ({i:ALL}.children, {j:ALL}.children) -> output.children

At initialization, cb1 and cb3 are triggered

  • cb1 returns 2 children from content1 and none for content2, the children of these wildcard components are all null
  • cb1 result processing triggers cb2 because there’s now != 0 wildcard outputs
  • cb3 is run with children values ([None, None], []) and returns 0because of value or 0
  • cb2 is run with None -> ([0, 0], [])

Expected behavior
We trigger cb3 again after assigning the children values after cb2 , similar to the followForward cases. The problem becomes more apparent when changing cb2 to return, for example, 5 instead of 0 on the None case — the test now displays the screenshot below, showing that it never really used the children content to calculate itself during initialization.

image

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

1 participant