You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ModuleNotFoundError: No module named 'aiohttp' #2590
A fresh install of pyTelegramBotAPI does not include aiohttp. So this code from the official documentation does not run:
#!/usr/bin/python# This is a simple echo bot using the decorator mechanism.# It echoes any incoming text messages.importasynciofromtelebot.async_telebotimportAsyncTeleBotbot=AsyncTeleBot('TOKEN')
# Handle '/start' and '/help'@bot.message_handler(commands=['help', 'start'])asyncdefsend_welcome(message):
text='Hi, I am EchoBot.\nJust write me something and I will repeat it!'awaitbot.reply_to(message, text)
# Handle all other messages with content_type 'text' (content_types defaults to ['text'])@bot.message_handler(func=lambdamessage: True)asyncdefecho_message(message):
awaitbot.reply_to(message, message.text)
asyncio.run(bot.polling())
Activity
Badiboy commentedon May 7, 2026
#2591