@mxrdxfxrrx
flstudio20, py3.x

Enable tracemalloc to get the object allocation traceback, как решить эту ошибку (aiogram)?

Запускаю программу с таким кодом:
#
for i in UUU:
    if i != '0':
	async def on_startup():
	    user_should_be_notified = мой id
	    await bot.send_message(user_should_be_notified, 'Активно!')
	if __name__ == '__main__':
            executor.start(dp, on_startup())
            executor.start_polling(dp, skip_updates=True)

Выводит ошибку:
C:\Users\Microsoft©\Documents\python\paste\vk_auth.py:175: RuntimeWarning: coroutine 'Executor._startup_polling' was never awaited
  pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\Users\Microsoft©\Documents\python\paste\vk_auth.py:175: RuntimeWarning: coroutine 'Executor._shutdown_polling' was never awaited
  pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
C:\Users\Microsoft©\Documents\python\paste\vk_auth.py:175: RuntimeWarning: coroutine 'normal_handler.<locals>.on_startup' was never awaited
  pass
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Я не понимаю, где мне ставить await, если тут используется тот же 'normal_handler', которого у меня нету
  • Вопрос задан
  • 329 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы