Skip to content

Progressbar does not update #185

@frsche

Description

@frsche

Description

update() does not update the progressbar when no Timer() (or ETA() etc.) widget is used.

Code

import progressbar, time
widgets = [progressbar.Percentage(), progressbar.Bar()]
bar = progressbar.ProgressBar(widgets=widgets, max_value=100).start()
for i in range(100):
    time.sleep(0.5)
    bar.update(i)

Always shows

N/A%|                                                                            |

If i use bar.update(i, force=True) it works as expected. If i change the second line to

widgets = [progressbar.Percentage(), progressbar.Bar(), progressbar.Timer()]

it's also works as expected.

Versions

  • Python version: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
  • Python distribution/environment: CPython
  • Operating System: Ubuntu Linux
  • Package version: 3.39.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions