Skip to content

rich based progress part doesn't 'complete' cleanly #1266

@GordonMcGregor

Description

@GordonMcGregor
  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
  • I have visited the source website, and in particular
    read the known issues
  • [X ] I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

$ python
import tqdm, sys
print(tqdm.version, sys.version, sys.platform)
Python 3.7.6 (default, Jan 8 2020, 13:42:34)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin

When I run a simple test case, comparing rich.progress to tqdm.rich, tqdm rich doesn't print the 'final' result, stopping maybe one update short in most cases. You'll see the rich.progress bar reach and display 100%, but the TQDM case always stops at some iteration before 100% in the display (data is correct)

testcase is:
$ python3 -c "from tqdm.rich import tqdm;from rich.progress import track;a=[n for n in track(range(10000000))];b=[n for n in tqdm(range(10000000))];"

$ python3 -c "from tqdm.rich import tqdm;from rich.progress import track;a=[n for n in track(range(10000000))];b=[n for n in tqdm(range(10000000))];"
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
-c:1: TqdmExperimentalWarning: rich is experimental/alpha
95% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━ 9,474,605/10,000,000 [ 0:00:01 < 0:00:01 , 5,662,501 it/s ]
(base)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions