Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

'InputPaidMedia' object has no attribute 'parse_mode' #4753

Labels
⚙️ bot-apiaffected functionality: bot-api
@ngrogolev

Description

@ngrogolev

Steps to Reproduce

  1. Initialize the application with default settings, including a parse_mode key
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⚙️ bot-apiaffected functionality: bot-api

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp