Skip to content
\n

The library throws an error

\n
  File \"/usr/lib/python3.13/asyncio/selector_events.py\", line 101, in close\n    raise RuntimeError(\"Cannot close a running event loop\")\nRuntimeError: Cannot close a running event loop\n<sys>:0: RuntimeWarning: coroutine 'Application.shutdown' was never awaited\n<sys>:0: RuntimeWarning: coroutine 'Application._bootstrap_initialize' was never awaited\n
\n

How would I achieve the correct behavior?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Found solution: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Frequently-requested-design-patterns#running-ptb-alongside-other-asyncio-frameworks

","upvoteCount":1,"url":"https://github.com/python-telegram-bot/python-telegram-bot/discussions/4901#discussioncomment-14066005"}}}
Discussion options

You must be logged in to vote

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by antsif-a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant