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

Suppresion of initial Callbacks at initialisation of app

Reading through this post and this outstanding issue I think I know the answer here, but just want to be sure…

I have an app that calls a lot of external data (Bloomberg mainly) and after adding some recent callbacks the initialisation of the app has become prone to some brutal exits. The debug on the exit is not that informative but the error handling beforehand shows that (I think) the exit process is being driven by the multiple Bloomberg calls triggered on startup of the app. The return of these calls is obviously poorly formatted and doesn’t behave the way the ‘real’ calls will when the Inputs are filled correctly by the user. So my question…is there a way to suppress the initial firing of all callbacks? I would prefer not to have to re-code the Bloomberg functions with many try/except clauses, as once the user is interacting with the functions one by one it is all very stable… Plus, I do understand Chris’ point in his reply on the community post (about a user potentially glancing at the output without the inital firing and some bits not making sense) but its not the case here and I don’t think thats a product of my bad coding, some apps just won’t have those dependencies so I don’t understand why this suppresion would be inherently ‘bad’ for the construction of all apps.

Thanks all for confirming the situation and/or suggesting another solution.

Not sure about a way to stop all callbacks. Check out dash.no_update. Just put this in a conditional statement in bottleneck functions in your callbacks and have some trigger in the layout stop those callbacks from running if some condition isn’t met.