While I wasn't able to replicate the error from the issue, I did find that set_progress((no_update, str(total))) sets the progress to 0:
This is because the progress bar's value is being set to "[object Object]", which is probably being interpreted as 0. The progress bar's HTML being: <progress id="progress_bar" value="[object Object]" max="5" style="visibility: visible;"></progress>.
I modified it so that if set_progress has no_update for a component's output, that component will not be updated, but the other components—assuming they are not no_update—will be updated.
Contributor Checklist
[x] I have broken down my PR scope into the following TODO tasks
[x] Allows for no_update in background callback set_progress
[x] I have run the tests locally and they passed. (refer to testing section in contributing)
[x] I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR
optionals
[ ] I have added entry in the CHANGELOG.md
[ ] If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
[ ] this GitHub [#PR number]() updates the dash docs
[ ] here is the show and tell thread in Plotly Dash community
Fixes #2846.
While I wasn't able to replicate the error from the issue, I did find that![image](https://github.com/plotly/dash/assets/33813815/bc85d396-6190-42d1-9b6c-cf7e53ebc7e5)
set_progress((no_update, str(total)))
sets the progress to 0:This is because the progress bar's value is being set to
"[object Object]"
, which is probably being interpreted as 0. The progress bar's HTML being:<progress id="progress_bar" value="[object Object]" max="5" style="visibility: visible;"></progress>
.I modified it so that if
set_progress
hasno_update
for a component's output, that component will not be updated, but the other components—assuming they are notno_update
—will be updated.Contributor Checklist
optionals
CHANGELOG.md