Closed pofey closed 2 years ago
Hi, thanks for reaching out.
We could indeed make a broader except clause here:
to avoid this issue. As a workaround, you can explicitly pass stop_signals=None
to prevent PTB from setting the signal handlers.
That said, you are miking threading with asyncio, which is rarely advisable. PTB v20 is designed to play well with other asyncio setups, so you might want to consider doing that instead :)
btw, run_polling
will by default close the event loop on exit anyway, unless you set close_loop=False
- so you can probably skip the loop.close()
in the finally
clause.
Thank you for your response, the issue has been resolved
Steps to Reproduce
Expected behaviour
can be run in python thread
Actual behaviour
raise exception "ValueError: set_wakeup_fd only works in main thread of the main interpreter"
Operating System
macos python3.9
Version of Python, python-telegram-bot & dependencies
Relevant log output
Additional Context