question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ProgressBar item_show_func displays the previous item

See original GitHub issue

I’ve noticed a bug with the item_show_func option for click.progressbar where the progress bar ends up showing the previous item instead of the current one.

The issue seems to be that ProgressBar.generator() will only render the progress bar after the current item has been processed. As a result, the previous item is visible on screen while the current one is in processing.

I think this change to lines 285-288 should fix the issue:

for rv in self.iter:
    self.current_item = rv
    self.render_progress()
    yield rv
    self.make_step(1)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JoelEagercommented, Mar 4, 2021

Thanks for taking the time to revive and resolve this. I’m looking forward to making use of your fix in the future.

0reactions
BALaka-18commented, Mar 2, 2021

@BALaka-18 there is already a PR for this, but it wasn’t linked for some reason. Sorry about that.

Sure ! Not a problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Progress Bars - Oracle Help Center
Uses a basic progress bar to show progress on a task running in a separate thread. ProgressMonitorDemo, This section, Modification of the previous...
Read more >
Handling ProgressBars | CodePath Android Cliffnotes
Overview. ProgressBar is used to display the progress of an activity while the user is waiting. You can display an indeterminate progress (spinning...
Read more >
Jquery - multi-step form progress bar using unordered list ...
My Progress bar is an unordered list with list items that are supposed to be highlighted red when the user presses next. But,...
Read more >
ProgressBar - Android Developers
Display progress bars to a user in a non-interruptive way. Show the progress bar in your app's user interface or in a notification...
Read more >
Set the Value Displayed by ProgressBar Control
How to: Set the Value Displayed by the Windows Forms ProgressBar Control. Article; 09/01/2020; 8 minutes to read; 1 contributor. Feedback ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found