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

CancelledError stack trace in terminal after quitting app with Ctrl+C #4629

Closed
darrenburns opened this issue Jun 8, 2024 · 2 comments
Closed

Comments

@darrenburns
Copy link
Member

I just quit my app using Ctrl+C and got the stack trace below. Not seen this before.

Details
Traceback (most recent call last):
  File "/Users/darrenburns/Code/posting/.venv/bin/posting", line 8, in 
    sys.exit(cli())
             ^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/src/posting/__main__.py", line 34, in default
    app.run()
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 1611, in run
    asyncio.run(run_app())
  File "/Users/darrenburns/.rye/py/[email protected]/install/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/.rye/py/[email protected]/install/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/darrenburns/.rye/py/[email protected]/install/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 1597, in run_app
    await self.run_async(
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 1563, in run_async
    await app._shutdown()
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 2778, in _shutdown
    await self._close_all()
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 2758, in _close_all
    await self._prune_node(stack_screen)
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/app.py", line 3393, in _prune_node
    await root._close_messages(wait=True)
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/message_pump.py", line 484, in _close_messages
    await Timer._stop_all(self._timers)
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/timer.py", line 123, in _stop_all
    await gather(*[stop_timer(timer) for timer in list(timers)])
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/timer.py", line 121, in stop_timer
    await timer._task
  File "/Users/darrenburns/Code/posting/.venv/lib/python3.11/site-packages/textual/timer.py", line 141, in _run_timer
    async def _run_timer(self) -> None:
asyncio.exceptions.CancelledError
@willmcgugan
Copy link
Collaborator

Fixed this recently. Try upgrading to 0.66.0

Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

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

No branches or pull requests

2 participants