- Notifications
You must be signed in to change notification settings - Fork5.7k
Description
Steps to Reproduce
- Initialize the application with default settings, including a parse_mode key
- Attempt to call send_paid_media with the Sequence of InputPaidMedia in media parameter
Expected behaviour
The send_paid_media method should successfully send the specified paid media to the target chat using the default parse_mode
Actual behaviour
Sending the media fails with an exception::AttributeError: 'InputPaidMedia' object has no attribute 'parse_mode'
Operating System
Linux
Version of Python, python-telegram-bot & dependencies
python-telegram-bot 22.0Bot API 8.3Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)]
Relevant log output
Traceback (mostrecentcalllast):File"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_application.py",line1298,inprocess_updateawaitcoroutineFile"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_handlers/conversationhandler.py",line842,inhandle_updatenew_state:object=awaithandler.handle_update(^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_handlers/basehandler.py",line158,inhandle_updatereturnawaitself.callback(update,context)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/bot/handlers/producer/producer_media_handler.py",line110,inset_price_handlerpaid_media_message=awaitcontext.bot.send_paid_media(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_extbot.py",line4385,insend_paid_mediareturnawaitsuper().send_paid_media(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/_bot.py",line9675,insend_paid_mediareturnawaitself._send_message(^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_extbot.py",line618,in_send_messageresult=awaitsuper()._send_message(^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/_bot.py",line803,in_send_messageresult=awaitself._post(^^^^^^^^^^^^^^^^^File"/path/to/the/project/.venv/lib/site-packages/telegram/_bot.py",line686,in_postself._insert_defaults(data)File"/path/to/the/project/.venv/lib/site-packages/telegram/ext/_extbot.py",line473,in_insert_defaultsifmedia.parse_modeisDEFAULT_NONE:^^^^^^^^^^^^^^^^AttributeError:'InputPaidMedia'objecthasnoattribute'parse_mode'
Additional Context
No response