N
N
noskokainoviy2022-03-25 19:45:22
Python
noskokainoviy, 2022-03-25 19:45:22

What is he swearing at? Where is the mistake?

I launched the telegram bot, everything started fine, when I enter a word, command, it gives such an error.

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'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
A9FM, 2022-03-25
@A9FM

How do you know we don't have the source code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question