Skip to content

Progress bar full during entire run when using reset with tqdm notebook #864

@Lawiss

Description

@Lawiss
  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand [StackOverflow#tqdm] is more appropriate)
    • new feature request
  • I have visited the [source website], and in particular
    read the [known issues]
  • I have searched through the [issue tracker] for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable: Ubuntu 18.04, tqdm 4.40.2, python 3.7

Hello, when I create a new bar in a notebook without a total, then use the reset method to add a total to the bar, the bar output's as a plain cyan bar that doesn't visually update, however the remaining time and iterations count work well. Step to reproduce in a notebook :

import tqdm.autonotebook as tqdm
bar=tqdm.notebook.tqdm()
bar.reset(10)
for i in range(10):
    sleep(3)
    bar.update(1)

image

However if I fill the total directly in the class constructor it works well:

import tqdm.autonotebook as tqdm
bar=tqdm.tqdm(total=10)
for i in range(10):
    sleep(3)
    bar.update(1)

image

Is this a normal behavior ? As I understand the reset method, these two pieces of code should give equivalent result.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions