No module named 'aiogram.utils.helper'
I can't even run the basic example even though version aiogram==3.0.0b7.
Tell me please, what could be the problem? All code and error is attached below.
@router.message(Command(commands=["start"])) async def command_handler(message: Message, state: FSMContext) -> None: await message.answer("Hello, new user!")
import pytest from aiogram.filters import Command from aiogram_tests import MockedBot from aiogram_tests.handler import MessageHandler from aiogram_tests.types.dataset import MESSAGE
from handlers.users.start import command_handler
@pytest.mark.asyncio async def test_command_handler(): requester = MockedBot(MessageHandler(command_handler, Command(commands=["start"]))) calls = await requester.query(MESSAGE.as_object(text="/start")) answer_message = calls.send_message.fetchone().text assert answer_message == "Hi there! What's your name?"
============================= test session starts =============================
collecting ...
test_start.py:None (test_start.py)
ImportError while importing test module 'C:\Users\inver\PycharmProjects\aiogram3-bot-template\tests\test_start.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..\venv\Lib\site-packages_pytest\python.py:617: in importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
..\venv\Lib\site-packages_pytest\pathlib.py:565: in import_path
importlib.import_module(module_name)
......\AppData\Local\Programs\Python\Python311\Lib\importlib_init.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ============================== 1 error in 1.04s ===============================
Looks it has been fixed in the git version https://github.com/OCCCAS/aiogram_tests/commit/ffb97eb122d5df3bc13d83e317d40871e61d3114