• Как вывести значения таблицы SQLite3 в inline-кнопках?

    @alexdem123 Автор вопроса
    И все же ошибка не ушла
    Написано
  • Как вывести значения таблицы SQLite3 в inline-кнопках?

    @alexdem123 Автор вопроса
    Traceback (most recent call last):
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 309, in _process_update      
        response = await self.feed_update(bot, update, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 158, in feed_update
        response = await self.update.wrap_outer_middleware(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\middlewares\error.py", line 25, in __call__       
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\middlewares\user_context.py", line 27, in __call__
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\fsm\middleware.py", line 41, in __call__
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\telegram.py", line 121, in trigger
        return await wrapped_inner(event, kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\handler.py", line 43, in call
        return await wrapped()
               ^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 276, in _listen_update
        return await self.propagate_event(update_type=update_type, event=event, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 128, in propagate_event
        return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 123, in _wrapped
        return await self._propagate_event(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 156, in _propagate_event
        response = await router.propagate_event(update_type=update_type, event=event, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 128, in propagate_event
        return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 123, in _wrapped
        return await self._propagate_event(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 148, in _propagate_event
        response = await observer.trigger(event, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\telegram.py", line 121, in trigger
        return await wrapped_inner(event, kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\handler.py", line 43, in call
        return await wrapped()
               ^^^^^^^^^^^^^^^
      File "d:\Projects\Python\Script for Shop\app\handlers.py", line 41, in catalog
        categories_kb.add(InlineKeyboardButton(text=categories, callback_data=f'category_'))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\pydantic\main.py", line 164, in __init__
        __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
    pydantic_core._pydantic_core.ValidationError: 1 validation error for InlineKeyboardButton
    text
      Input should be a valid string [type=string_type, input_value=['Яндекс'], input_type=list]
        For further information visit https://errors.pydantic.dev/2.5/v/string_type
    Написано
  • Проблема с SQLite3, как решить?

    @alexdem123 Автор вопроса
    Everything_is_bad,
    Traceback (most recent call last):
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 309, in _process_update      
        response = await self.feed_update(bot, update, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 158, in feed_update
        response = await self.update.wrap_outer_middleware(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\middlewares\error.py", line 25, in __call__       
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\middlewares\user_context.py", line 27, in __call__
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\fsm\middleware.py", line 41, in __call__
        return await handler(event, data)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\telegram.py", line 121, in trigger
        return await wrapped_inner(event, kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\handler.py", line 43, in call
        return await wrapped()
               ^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\dispatcher.py", line 276, in _listen_update
        return await self.propagate_event(update_type=update_type, event=event, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 128, in propagate_event
        return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 123, in _wrapped
        return await self._propagate_event(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 156, in _propagate_event
        response = await router.propagate_event(update_type=update_type, event=event, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 128, in propagate_event
        return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 123, in _wrapped
        return await self._propagate_event(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\router.py", line 148, in _propagate_event
        response = await observer.trigger(event, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\telegram.py", line 121, in trigger
        return await wrapped_inner(event, kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\aiogram\dispatcher\event\handler.py", line 43, in call
        return await wrapped()
               ^^^^^^^^^^^^^^^
      File "d:\Projects\Python\Script for Shop\app\handlers.py", line 41, in catalog
        keyboard = InlineKeyboardMarkup()
                   ^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\Professional\AppData\Local\Programs\Python\Python312\Lib\site-packages\pydantic\main.py", line 164, in __init__
        __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
    pydantic_core._pydantic_core.ValidationError: 1 validation error for InlineKeyboardMarkup
    inline_keyboard
      Field required [type=missing, input_value={}, input_type=dict]
        For further information visit https://errors.pydantic.dev/2.5/v/missing
    Написано
  • Как отправить фото и текст aiogram?

    @alexdem123 Автор вопроса
    Duboviy_001, Сделал как вы сказали, не работает(
    Написано
  • Как отправить фото и текст aiogram?

    @alexdem123 Автор вопроса
    Выдает это(
    AttributeError: 'Message' object has no attribute 'send_photo'. Did you mean: 'reply_photo'?
    Написано
  • Как отправить фото и текст aiogram?

    @alexdem123 Автор вопроса
    Может быть посоветуете другой способ?
    Написано