-
Notifications
You must be signed in to change notification settings - Fork 6k
Labels
⚙️ bot-apiaffected functionality: bot-apiaffected functionality: bot-api
Description
Steps to Reproduce
- Call
bot.get_sticker_set(name)
Expected behaviour
.get_sticker_set() should return a StickerSet object
Actual behaviour
.get_sticker_set() throws: TypeError: StickerSet.__init__() missing 2 required positional arguments: 'is_animated' and 'is_video'
Operating System
Windows
Version of Python, python-telegram-bot & dependencies
python-telegram-bot 20.8
Bot API 7.0
Python 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)]Relevant log output
File "C:\Users\...\env\Lib\site-packages\telegram\ext\_extbot.py", line 1934, in get_sticker_set
return await super().get_sticker_set(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\env\Lib\site-packages\telegram\_bot.py", line 542, in decorator
result = await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\env\Lib\site-packages\telegram\_bot.py", line 6092, in get_sticker_set
return StickerSet.de_json(result, self) # type: ignore[return-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\env\Lib\site-packages\telegram\_files\sticker.py", line 330, in de_json
return super()._de_json(data=data, bot=bot, api_kwargs=api_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\...\env\Lib\site-packages\telegram\_telegramobject.py", line 403, in _de_json
raise exc
File "C:\Users\...\env\Lib\site-packages\telegram\_telegramobject.py", line 400, in _de_json
obj = cls(**data, api_kwargs=api_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: StickerSet.__init__() missing 2 required positional arguments: 'is_animated' and 'is_video'Additional Context
Telegram seems to be gearing up to allow mixed-media sticker packs. From yesterday's update:
Mixed-Format Sticker Packs
- Removed the fields is_animated and is_video from the class StickerSet.
- Added the field format to the class InputSticker.
Not sure if they've made any other announcements yet, but the StickerSet class may need to be reworked.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
⚙️ bot-apiaffected functionality: bot-apiaffected functionality: bot-api