Forums

Error running WSGI application

Heyyo, I'm trying to set up a Flask web application, the bot is written in the PyTelegramBotAPI library. When I try to run it, I get this error:

Error running WSGI application
AttributeError: module 'telebot' has no attribute 'TeleBot'
File "/var/www/ikadetov_pythonanywhere_com_wsgi.py", line 111, in <module>
    from main import app as application

File "/home/ikadetov/trigash2.0/main.py", line 10, in <module>
     from dispatcher import Bot

File "/home/ikadetov/trigash2.0/dispatcher.py", line 9, in <module>
     Bot = telebot.TeleBot(TOKEN)

it is clear that the telebot module has the "TeleBot" attribute. Had the same error recently but it couldn't find another module. How to steam it?

Maybe you have other module named telebot that is imported there and it is not what you expect.