@noskokainoviy

На что ругается? В чем ошибка?

Запустил телеграм-бота, запустил все нормально, при вводе слова, команды, выдает такую ошибку.

SUCCESS: Specified value was saved.
Updates were skipped successfully.
Бот в онлайне
Task exception was never retrieved
future: <Task finished name='Task-9' coro=<Dispatcher._process_polling_updates() done, defined at C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\dispatcher.py:407> exception=TypeError("get_state() missing 1 required positional argument: 'self'")>
Traceback (most recent call last):
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\filters\builtin.py", line 543, in check
    state = self.ctx_state.get()
LookupError: <ContextVar name='user_state' at 0x000001C660794A90>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\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\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
    return await asyncio.gather(*tasks)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
    response = await handler_obj.handler(*args, **partial_data)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 256, in process_update
    return await self.message_handlers.notify(update.message)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\handler.py", line 107, in notify
    data.update(await check_filters(handler_obj.filters, args))
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\filters\filters.py", line 72, in check_filters
    f = await execute_filter(filter_, args)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\filters\filters.py", line 56, in execute_filter
    return await filter_.filter(*args, **filter_.kwargs)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\filters\filters.py", line 161, in __call__
    return await self.check(*args)
  File "C:\Users\99555\AppData\Local\Programs\Python\Python38\lib\site-packages\aiogram\dispatcher\filters\builtin.py", line 548, in check
    state = await self.dispatcher.storage.get_state(chat=chat, user=user)
TypeError: get_state() missing 1 required positional argument: 'self'
  • Вопрос задан
  • 247 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

Похожие вопросы
23 нояб. 2024, в 01:31
1000 руб./за проект
23 нояб. 2024, в 00:16
2000 руб./за проект
22 нояб. 2024, в 23:55
3000 руб./за проект