• Как исправить ошибку в python - Task exception was never retrieved?

    @ar4ushman Автор вопроса
    Спасибо огромное!
  • Как исправить ошибку в python - Task exception was never retrieved?

    @ar4ushman Автор вопроса
    Модератор, future: exception=BadRequest("Can't parse reply keyboard markup json object")>
    Traceback (most recent call last):
    File "D:\Python\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 "D:\Python\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
    return await asyncio.gather(*tasks)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 256, in process_update
    return await self.message_handlers.notify(update.message)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
    response = await handler_obj.handler(*args, **partial_data)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Кира\4_module\HW4_mnu.py", line 31, in cmd_start
    await msg.reply('Привет! Выбери царство.', reply_markup=kingdom)
    File "D:\Python\Lib\site-packages\aiogram\types\message.py", line 1687, in reply
    return await self.bot.send_message(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\bot\bot.py", line 346, in send_message
    result = await self.request(api.Methods.SEND_MESSAGE, payload)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\bot\base.py", line 236, in request
    return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\bot\api.py", line 140, in make_request
    return check_result(method, response.content_type, response.status, await response.text())
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\Python\Lib\site-packages\aiogram\bot\api.py", line 115, in check_result
    exceptions.BadRequest.detect(description)
    File "D:\Python\Lib\site-packages\aiogram\utils\exceptions.py", line 141, in detect
    raise cls(description)
    aiogram.utils.exceptions.BadRequest: Can't parse reply keyboard markup json object