Аt
Size: a a a
Аt
<Ч
SH
T
Аt
runfile('Z:/abpython/testbot.py', wdir='Z:/abpython')
Traceback (most recent call last):
File "C:\Users\anyap\Anaconda3\lib\site-packages\aiogram\utils\executor.py", line 309, in start_polling
loop.run_until_complete(self._startup_polling())
File "C:\Users\anyap\Anaconda3\lib\asyncio\base_events.py", line 592, in run_until_complete
self._check_running()
File "C:\Users\anyap\Anaconda3\lib\asyncio\base_events.py", line 552, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Z:\abpython\testbot.py", line 25, in <module>
executor.start_polling(dp, skip_updates=True)
File "C:\Users\anyap\Anaconda3\lib\site-packages\aiogram\utils\executor.py", line 41, in start_polling
executor.start_polling(reset_webhook=reset_webhook, timeout=timeout, relax=relax, fast=fast)
File "C:\Users\anyap\Anaconda3\lib\site-packages\aiogram\utils\executor.py", line 317, in start_polling
loop.run_until_complete(self._shutdown_polling())
File "C:\Users\anyap\Anaconda3\lib\asyncio\base_events.py", line 592, in run_until_complete
self._check_running()
File "C:\Users\anyap\Anaconda3\lib\asyncio\base_events.py", line 552, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
T
import logging
from aiogram import Bot, Dispatcher, executor, types
API_TOKEN = token
logging.basicConfig(level=logging.INFO)
bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot)
@dp.message_handler(commands=['start', 'help'])
async def send_welcome(message: types.Message):
await message.reply('Hi!')
@dp.message_handler()
async def echo(message: types.Message):
await message.answer(message.text)
if name == 'main':
executor.start_polling(dp, skip_updates=True)
<Ч
Аt
T
T
Е
<Ч
T
<Ч
Аt
Аt
SH
T
Е
T