@fokioff

Как решить проблему с аргументами?

Мне нужно два аргумента message: Message и call: types.CallbackQuery, но когда я их указываю - происходит ошибка missing 1 required positional argument: 'call' . Что с этим сделать?
async def csearc1h(message: Message, call: types.CallbackQuery):


Полная ошибка:
ERROR:asyncio:Task exception was never retrieved
future: exception=TypeError("csearc1h() missing 1 required positional argument: 'call'")>
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 283, in process_update
return await self.callback_query_handlers.notify(update.callback_query)
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
TypeError: csearc1h() missing 1 required positional argument: 'call'
  • Вопрос задан
  • 206 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

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