I’m fairly new to Dash but not complete newbie anymore (I suppose). Few weeks ago I finished some bigger project for personal use. I was learning as I go.
Code works fine and I use it on daily basis (Thanks for DASH, without it I, most likely, wouldn’t be able to accomplish what I’ve done in the same amount of time, My code is quite useful).
Now, when coding, I wasn’t aware of ‘Double callback’ limitation and I do have the same id in different callbacks as an Output. And the code runs fine!
Yesterday I set up spare comp. The same OS (Linux) same env (Conda export) but this time I have 9 Duplicate Callback errors. Still, on my main machine the code runs fine, without any issues.
Probably, eventually I will have to rewrite the code again but want to understand what is going on. Where to start to investigate. What may cause different behavior of the code in the same envs on different machines?
I did. And it works… kind off.
I haven’t been using dash_extensions so far, so I had to install it first then I added suppress_callback_exceptions and app started to show signs of live. Actually it is almost ok, means works on spare comp.
I didn’t play with it for long but I noticed couple errors popping out here and there.
So thanks for advice and thanks to author of dash_extension module.
(One thing I noticed is that proxy_app takes longer to start.)
The mystery in the whole thing is why this app runs flawlessly on my main comp where I have not used dash_extensions. In one example, I have the same Output id appearing in 4 different callbacks which is handled by Dash without a problem.
It sounds really weird that it should work with the same Output four times. That has never been supported in Dash to my knowledge. Have you tried running in debug mode? Maybe you are just not seeing the errors because they are being suppressed…
How large is your app? And what transforms are you using? Just the MultiplexerTransform? I haven’t seen any cases so far where using the DashProxy would increase load time significantly.
Yes, I run my app in debug mode. I do have 4 callbacks addressing the same Output and it works.
When I wrote the code I was not aware about this limitation (that single Output can be addressed only in a single callback) and no errors popped out. Nevertheless the code does work. I do not know how to perform the investigation ‘why’, though. Maybe it is something very simple. One thing I’m sure off: I have never imported dash-extension module on my main at all to any env.
I have the same OS and the same conda env (I suppose because I used export env method and created new env on new machine from the file). My code runs on one system and does not on the other.
I plan to rewrite the code but am occupied presently with other work, and since this app works on my main machine it is not an urgency at the moment.
The code is little over 3K lines total (including css), I have ~16 callbacks (some pretty simple, some complicated).
I don’t know what MultiplexerTransform is.
Re DashProxy - I didn’t do any tests, What I wrote was an impression only. App started seemingly slower. Maybe it was because it was first time or because other machine is bit slower than main. I didn’t follow as there are still some errors showing after using dash_extension. As said my intention is to eventually rewrite the code to conform to “one Callback - one Output” rule, but I’m curious why the code runs on my main as is?
Hi - what Marcas mentioned just happened with an app I was working on. While developing, I was on a Windows machine with Dash==1.19.0. I had multiple callbacks that referenced the same outputs and the same properties - it worked without any errors displayed.
When I ported over to production on a Linux + Docker set up, I started seeing the error around multiple callbacks referencing the same object. At first, I thought this was because the versions of Dash were different - however I set them both to 1.19.0 and they still behave differently.
** One thing I’ve noticed is that the underlying Dash Core Components have different versions in both systems, even though dash itself is 1.19.0 - could this be the cause of this confusing behavior?