an error given while trying to use telepot in PythonAnywhere

258 Views Asked by At

I'm trying to upload a simple Telegram bot code to PythonAnywhere, which uses the telepot library. I installed the library in the bash console but when I tried to run the program, I was given the following error:

ModuleNotFoundError: No module named telepot

this is my code:

import teleport


update_id = None
bot = telepot.Bot('MY TOKEN HERE')


while True:
    response = bot.getUpdates(offset=update_id)
    try:
        update_id = (response[0]["update_id"] + 1)
    except:
        continue
    print(response)
    bot.sendMessage(response[0]["message"]["from"]["id"], "got the message, thank you!")
0

There are 0 best solutions below