[Python] ImportError: cannot import name 'executor' from 'aiogram.utils'

Discussão em 'Python' iniciado por Stack, Maio 1, 2025.

  1. Stack

    Stack Membro Participativo

    Before I tried to reinstall pip and I also tried to import executor this way from aiogram.utils import executor but I still have ImportError.

    from aiogram import Bot, Dispatcher, types
    from aiogram.utils import executor

    bot = Bot("")
    dp = Dispatcher(bot)

    @dp.message_handler(commands=['star'])
    async def start(message: types.Message):
    await message.answer('Hello')

    executor.start_polling(dp)

    Continue reading...

Compartilhe esta Página