Black Lives Matter. Please consider donating to Black Girls Code today.

Callback output VS human interaction

I’ve recently encountered a strange behavior (using dash 1.9.1.).

I have a dcc.Tabs component whose value is selected in two possible ways (apart than default).

One is a human click (obviously) and the other is an output of a callback (more specifically, it’s an Output of a dash.data_table cell click). The human click works about every single time, so there seems to be no problem with that.
The output part however is problematic. The Output/callback part works, as long as a user did not click on any of the Tabs possible.
If a user does though, something really weird happens with subsequent attempts that are made from the callback. The callbacks do trigger and the function finishes (as far as i can tell), but nothing gets rendered (am returning couple if figures, but that should not matter).
Please note, that the callback worked prior to the human-interaction without any issues.

My theory is, that Dash somehow caches the human selection and then if the programmatical trigger is fired, it evaluates, that, the value was not adjusted (ie. the selection was made with the same value?), therefore it suppresses the callback?
I don’t know, it should not matter, from where is the trigger coming from, but this seems to be the behavior i get.

There is no error being thrown neither in the python console, nor the browser console. So i have hard time debugging what is actually going on.
Could anybody point me into a right direction?

Thanks in advance


hm, sounds like it could be a bug but it’s hard to say. could you try to reduce your app into a simple, minimal, reproducible example that demonstrates the issue and share it with us?

thank you very much for your reply.
I failed to reproduce the error in a minimal way, therefore figured that the issue probably lies elsewhere.
After some more investigating i managed to find and fix the issue.
I was outputing layout + value in a callback, where the value was used to to trigger some more callbacks to populate the content of the layout.
I assume sometimes Dash outputed the layout prior to the dynamic content, while other times not, therefore it did not have a place to output the components to, resulting into the inconsistent behavior described above.

So once again, thanks for setting me onto the right path,