eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.11k stars 2.03k forks source link

TypeError: StickerSet.__init__() missing 2 required positional arguments: 'is_animated' and 'is_video' #2212

Closed Kuchizu closed 7 months ago

Kuchizu commented 7 months ago

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using?

Name: pyTelegramBotAPI Version: 4.16.1 Summary: Python Telegram bot api. Home-page: Author: Author-email: eternnoir eternnoir@gmail.com License: GPL2 Location: /root/FaceSwappers/ManSwapper/venv/lib/python3.10/site-packages Requires: requests Required-by:

  1. What OS are you using?

Ubuntu 22.04

  1. What version of python are you using?

Python 3.10.12

Problem:

bot.get_sticker_set(sticker_set_name)

Traceback (most recent call last): File "/root/FaceSwappers/BrotherSwapper/swapper.py", line 67, in process_queue self.create_sticker_pack(message, face) File "/root/FaceSwappers/BrotherSwapper/logger.py", line 52, in wrapper result = method(*args, kwargs) File "/root/FaceSwappers/BrotherSwapper/swapper.py", line 132, in create_sticker_pack self.send_sticker_set(message.from_user.id, sticker_set_name) File "/root/FaceSwappers/BrotherSwapper/swapper.py", line 191, in send_sticker_set pack = self.bot.get_sticker_set(sticker_set_name) File "/root/FaceSwappers/ManSwapper/venv/lib/python3.10/site-packages/telebot/init.py", line 5457, in get_sticker_set return types.StickerSet.de_json( File "/root/FaceSwappers/ManSwapper/venv/lib/python3.10/site-packages/telebot/types.py", line 6309, in de_json return cls(obj) TypeError: StickerSet.init() missing 2 required positional arguments: 'is_animated' and 'is_video'

coder2020official commented 7 months ago

We have to do something 😢 Yes, we are aware of the issue. It was caused by bot API update

Kuchizu commented 7 months ago

There's a temporary solution of this from another library, does Telebot have some similar method to do raw API requests?

https://github.com/python-telegram-bot/python-telegram-bot/issues/4181#issuecomment-2029046687

Badiboy commented 7 months ago

https://github.com/eternnoir/pyTelegramBotAPI/pull/2217