We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug track stops iterating after producing one value while running asynchronously.
To Reproduce Following code is just to simulate bug. I am using rich progress bar to track progress of asynchronous downloading tasks.
async def sleeper(val): await asyncio.sleep(1) return val async def scheduler(): tasks = [sleeper(i) for i in range(10)] total_tasks = len(tasks) for task in track( asyncio.as_completed(tasks), description="Processing...", total=total_tasks, ): await task def get_event_loop(): try: loop = asyncio.get_event_loop() except RuntimeError: loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) if sys.platform.startswith("win"): if isinstance(loop, asyncio.SelectorEventLoop): loop = asyncio.ProactorEventLoop() asyncio.set_event_loop(loop) return loop def run_coroutine(coro): loop = get_event_loop() aws = asyncio.ensure_future(coro) result = loop.run_until_complete(aws) return result if __name__ == "__main__": run_coroutine(scheduler())
Platform What platform (Win/Linux/Mac) are you running on? I have tried on both Linux and Windows and both are producing same bug.
What terminal software are you using? bash terminal on linux and powershell on windows.
Which version of Rich? rich>=4.1.0 produces this bug. Works fine in rich<=4.0.0
The text was updated successfully, but these errors were encountered:
Try v4.2.1
Sorry, something went wrong.
Thanks! It's working fine now.
No branches or pull requests
Describe the bug
track stops iterating after producing one value while running asynchronously.
To Reproduce
Following code is just to simulate bug. I am using rich progress bar to track progress of asynchronous downloading tasks.
Platform
What platform (Win/Linux/Mac) are you running on?
I have tried on both Linux and Windows and both are producing same bug.
What terminal software are you using?
bash terminal on linux and powershell on windows.
Which version of Rich?
rich>=4.1.0 produces this bug. Works fine in rich<=4.0.0
The text was updated successfully, but these errors were encountered: