Forums

Making uWSGI and telepot's DelegatorBot work

Hello all,

thank you for providing such a great web service!

I am using a free account and tried to create a Telegram bot with PythonAnywhere using the telepot framework as suggested in one of the official tutorials. This works. However, the subsequent step is using the DelegatorBot class of telepot to properly handle chats with multiple users. For this, DelegatorBot requires either threads or the asyncio library. However, according to an older post asyncio is not supported by the uWSGI in use and according to my logs threads are disabled:

*** Python threads support is disabled. You can enable it with --enable-threads ***

Currently there is an open issue at the telepot project, but it seems the people there can't do much about it. Is there anything I can do?

PythonAnywhere does not support threads for webapps, so there isn't much you can do on the PythonAnywhere end.

That's a pity, but thanks for answering!