You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the code example below there are 100 major tasks that each contain 10 minor tasks. I've done this using a Live of a Table with two Progress bars. The minor tasks are added once at a time. After each major task, the minor tasks are removed.
This snippet leads to some artifacts being generated above the Live which is slowly sliding down at seemingly random times.
I've added a screenshot below to illustrate.
To Reproduce Please note: The bug occurs often but at seemingly random times. Give it a few major tasks and it should show up.
importtimefromrich.liveimportLivefromrich.progressimportProgress, BarColumn, TimeRemainingColumn, TextColumn, SpinnerColumn, TransferSpeedColumn, FileSizeColumn, TotalFileSizeColumnfromrich.tableimportTableprogressOverall=Progress(
"{task.completed} of {task.total}",
BarColumn(),
"[progress.percentage]{task.percentage:>3.2f}%",
TimeRemainingColumn(),
"[progress.description]{task.description}",
)
taskOverall=progressOverall.add_task("[red]Downloading piece...", total=100)
progressFile=Progress(
"├─",
SpinnerColumn(),
BarColumn(),
"[progress.percentage]{task.percentage:>3.0f}%",
TransferSpeedColumn(),
TotalFileSizeColumn(),
TimeRemainingColumn(),
"[progress.description]{task.description}",
)
progress_table=Table(show_header=False, show_edge=False)
progress_table.add_row(progressOverall)
progress_table.add_row(progressFile)
withLive(progress_table, refresh_per_second=30, vertical_overflow="visible") aslive:
print=live.console.printforiinrange(100):
progressOverall.update(taskOverall, completed=i, description="Major Task # %s"% (i)) # Update major task with progressforminorTaskIDinrange(10):
taskFile=progressFile.add_task("[red]Downloading: %d"% (minorTaskID), total=100) # Create minor tasktime.sleep(0.4)
progressFile.update(taskFile, description="[green]Done", completed=100) # Simulate it being done after a couple of 0.4stime.sleep(0.4)
# Clear the minor tasks for the next major taskfortaskinprogressFile.task_ids:
progressFile.remove_task(task)
time.sleep(0.5)
Output
Platform
Microsoft Windows 10 Pro Version 10.0.19041 Build 19041
Describe the bug
In the code example below there are 100 major tasks that each contain 10 minor tasks. I've done this using a Live of a Table with two Progress bars. The minor tasks are added once at a time. After each major task, the minor tasks are removed.
This snippet leads to some artifacts being generated above the Live which is slowly sliding down at seemingly random times.
I've added a screenshot below to illustrate.
To Reproduce
Please note: The bug occurs often but at seemingly random times. Give it a few major tasks and it should show up.
Output
Platform
Microsoft Windows 10 Pro Version 10.0.19041 Build 19041
Diagnose
The text was updated successfully, but these errors were encountered: