- Notifications
You must be signed in to change notification settings - Fork5.7k
Description
Steps to Reproduce
context.bot.get_available_gifts()
Expected behaviour
you get json from the server that is parsed with Gift class
Actual behaviour
TypeError: Gift.init() got an unexpected keyword argument 'upgrade_star_count'
Operating System
ubuntu
Version of Python, python-telegram-bot & dependencies
Requirement already satisfied: python-telegram-botin (21.9)Requirement already satisfied: httpx~=0.27in (from python-telegram-bot) (0.27.2)Requirement already satisfied: anyioin (from httpx~=0.27->python-telegram-bot) (4.4.0)Requirement already satisfied: certifiin (from httpx~=0.27->python-telegram-bot) (2023.11.17)Requirement already satisfied: httpcore==1.*in (from httpx~=0.27->python-telegram-bot) (1.0.5)Requirement already satisfied: idnain (from httpx~=0.27->python-telegram-bot) (3.6)Requirement already satisfied: sniffioin (from httpx~=0.27->python-telegram-bot) (1.3.1)Requirement already satisfied: h11<0.15,>=0.13in (from httpcore==1.*->httpx~=0.27->python-telegram-bot) (0.14.0)
Relevant log output
Noerrorhandlersareregistered,loggingexception.Traceback (mostrecentcalllast):File"/home/USER/.local/lib/python3.12/site-packages/telegram/ext/_application.py",line1325,inprocess_updateawaitcoroutineFile"/home/USER/.local/lib/python3.12/site-packages/telegram/ext/_handlers/basehandler.py",line158,inhandle_updatereturnawaitself.callback(update,context)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/bot.py",line65,ingiftsgifts=awaitcontext.bot.get_available_gifts()^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/ext/_extbot.py",line4453,inget_available_giftsreturnawaitsuper().get_available_gifts(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_bot.py",line9670,inget_available_giftsreturnGifts.de_json(# type: ignore[return-value]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_gifts.py",line135,inde_jsondata["gifts"]=Gift.de_list(data.get("gifts"),bot)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_telegramobject.py",line465,inde_listreturntuple(objforobjin (cls.de_json(d,bot)fordindata)ifobjisnotNone)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_telegramobject.py",line465,in<genexpr>returntuple(objforobjin (cls.de_json(d,bot)fordindata)ifobjisnotNone)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_telegramobject.py",line465,in<genexpr>returntuple(objforobjin (cls.de_json(d,bot)fordindata)ifobjisnotNone)^^^^^^^^^^^^^^^^^^^File"/home/USER/.local/lib/python3.12/site-packages/telegram/_gifts.py",line93,inde_jsonreturncls(**data)^^^^^^^^^^^TypeError:Gift.__init__()gotanunexpectedkeywordargument'upgrade_star_count'
Additional Context
after a recent update of the Telegram API, "get_available_gifts" was added to the Gift class, which is not in the library, so any requests with the get_available_gifts() method end with an error
Metadata
Metadata
Assignees
Labels
No labels