Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] the percent column is causing problems (flickering). #1721

Closed
snooppr opened this issue Nov 26, 2021 · 3 comments · Fixed by #1723
Closed

[BUG] the percent column is causing problems (flickering). #1721

snooppr opened this issue Nov 26, 2021 · 3 comments · Fixed by #1723

Comments

@snooppr
Copy link

snooppr commented Nov 26, 2021

"[progress.percentage]{task.percentage:>1.0f}%"

During progress, appears (with each iteration update or auto update of progress) 'progress.percentage' It should not be there. This issue is not present in rich 9.
Watch the animation with and without a problem.
Problem on Linux and Android (Windows did not check)

rich 10 14
Rich 10.14

rich 9
Rich 9

@willmcgugan
Copy link
Collaborator

I don't see that here. Can you give me a full working example that shows the issue.

@snooppr
Copy link
Author

snooppr commented Nov 26, 2021

I don't see that here. Can you give me a full working example that shows the issue.

This simple example reproduces the problem

from rich.progress import (track,BarColumn,TimeRemainingColumn,SpinnerColumn,TimeElapsedColumn,Progress)
import time
import sys
import random

if sys.platform != 'win32':
    progress = Progress(TimeElapsedColumn(), SpinnerColumn(spinner_name=random.choice(["dots", "dots12"])),
    "[progress.percentage]{task.percentage:>1.0f}%", BarColumn(bar_width=None, complete_style='cyan', finished_style='cyan bold'),
    refresh_per_second = 3.0)

with progress:
    task=[i for i in range(10)]
    task_perc = progress.add_task("", total=len(task))
    for i in task:
            progress.update(task_perc, advance=1)
            time.sleep(0.5)
            print(i)

rich-9.10.0 works correctly.
rich-10.14.0 bad.

@github-actions
Copy link

Did I solve your problem?

Consider sponsoring the ongoing work on Rich and Textual.

Or buy me a coffee to say thanks.

Will McGugan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants