aiogram icon indicating copy to clipboard operation
aiogram copied to clipboard

Failed deserealization on get_sticker_set method

Open KolosDan opened this issue 1 year ago • 0 comments

Checklist

  • [X] I am sure the error is coming from aiogram code
  • [X] I have searched in the issue tracker for similar bug reports, including closed ones

Operating system

Docker ubuntu 22.04

Python version

3.11

aiogram version

3.4.1

Expected behavior

Get StickerSet object on get_sticker_set method

Current behavior

Method raises a pydantic validation error due to mismatch of models with Telegram API patch 31.03.2024

Failed to deserialize object Caused from error: pydantic_core._pydantic_core.ValidationError: 2 validation errors for Response[StickerSet] result.is_animated Field required [type=missing, input_value={'name': 's2_z8ff4r_by_me...', 'file_size': 23036}]}, input_type=dict] For further information visit https://errors.pydantic.dev/2.5/v/missing result.is_video Field required [type=missing, input_value={'name': 's2_z8ff4r_by_me...', 'file_size': 23036}]}, input_type=dict]

Steps to reproduce

  1. Call get_sticker_set method

Code example

sticker_set = await bot.get_sticker_set(stickerset_name)

Logs

Failed to deserialize object
Caused from error: pydantic_core._pydantic_core.ValidationError: 2 validation errors for Response[StickerSet]
 result.is_animated
Field required [type=missing, input_value={'name': 's2_z8ff4r_by_me...', 'file_size': 23036}]}, input_type=dict]
     For further information visit https://errors.pydantic.dev/2.5/v/missing
 result.is_video
   Field required [type=missing, input_value={'name': 's2_z8ff4r_by_me...', 'file_size': 23036}]}, input_type=dict]

Additional information

No response

KolosDan avatar Apr 02 '24 11:04 KolosDan