Title: [BUG] InlineKeyboardButton with switch_inline_query='' doesn't work · Issue #1594 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [BUG] InlineKeyboardButton with switch_inline_query='' doesn't work · Issue #1594 · python-telegram-bot/python-telegram-bot
X Title: [BUG] InlineKeyboardButton with switch_inline_query='' doesn't work · Issue #1594 · python-telegram-bot/python-telegram-bot
Description: Steps to reproduce Send a message with a inline keyboard button with switch_inline_query='' inline_btn = InlineKeyboardButton('inline button', switch_inline_query='') print(inline_btn) markup = InlineKeyboardMarkup([[inline_btn]]) update...
Open Graph Description: Steps to reproduce Send a message with a inline keyboard button with switch_inline_query='' inline_btn = InlineKeyboardButton('inline button', switch_inline_query='') print(inline_btn) markup = Inl...
X Description: Steps to reproduce Send a message with a inline keyboard button with switch_inline_query='' inline_btn = InlineKeyboardButton('inline button', switch_inline_query='') print(...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/1594
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] InlineKeyboardButton with switch_inline_query='' doesn't work","articleBody":"\u003c!--\r\nThanks for reporting issues of python-telegram-bot!\r\n\r\nUse this template to notify us if you found a bug.\r\n\r\nTo make it easier for us to help you please enter detailed information below.\r\n\r\nPlease note, we only support the latest version of python-telegram-bot and\r\nmaster branch. Please make sure to upgrade & recreate the issue on the latest\r\nversion prior to opening an issue.\r\n-->\r\n### Steps to reproduce\r\n1. Send a message with a inline keyboard button with `switch_inline_query=''`\r\n```\r\ninline_btn = InlineKeyboardButton('inline button', switch_inline_query='')\r\nprint(inline_btn)\r\nmarkup = InlineKeyboardMarkup([[inline_btn]])\r\nupdate.message.reply_text('message with inline button', reply_markup=markup)\r\n```\r\n2. Output of the print statement:\r\n`{'text': 'inline button'}`\r\nalong with error message: \"Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard\"\r\n\r\n### Expected behaviour\r\nThe message should appear with the button as documented: \"Can be empty, in which case just the bot’s username will be inserted.\"\r\n\r\n### Actual behaviour\r\nMessage and button doesn't appear and error is thrown\r\n\r\n### Configuration\r\n**Operating System:**\r\nWindows 10\r\n\r\n**Version of Python, python-telegram-bot & dependencies:**\r\n\r\n``$ python -m telegram``\r\npython-telegram-bot 12.2.0\r\ncertifi 2019.09.11\r\nfuture 0.18.1\r\nPython 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)]\r\n\r\n### Logs\r\n```\r\n{'text': 'inline button'}\r\nWARNING - Update \"...\" caused error \"Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard\"\r\n```","author":{"url":"https://github.com/davidchoo12","@type":"Person","name":"davidchoo12"},"datePublished":"2019-11-01T09:53:56Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/1594"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:38e3fb1c-47eb-a00f-fc72-000fcbf52293 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A0A:202631:7A49AF:9F2DE4:6B026F07 |
| html-safe-nonce | a3dca86fad9c9cac9d08da7a9c08e7e8572411dcff1429b69a8bba7abc471b3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTBBOjIwMjYzMTo3QTQ5QUY6OUYyREU0OjZCMDI2RjA3IiwidmlzaXRvcl9pZCI6IjQyNTM1MDgwNTU3OTY0NDQ5MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 06c71975d2452df9ae5be003e8c85d5337c659d36e78d2af24c5aa56b686c617 |
| hovercard-subject-tag | issue:516016304 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/1594/issue_layout |
| twitter:image | https://opengraph.githubassets.com/79266bbe1498eb71295562021733b52baf4326101ada5a2d4d31dca42b43eafc/python-telegram-bot/python-telegram-bot/issues/1594 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/79266bbe1498eb71295562021733b52baf4326101ada5a2d4d31dca42b43eafc/python-telegram-bot/python-telegram-bot/issues/1594 |
| og:image:alt | Steps to reproduce Send a message with a inline keyboard button with switch_inline_query='' inline_btn = InlineKeyboardButton('inline button', switch_inline_query='') print(inline_btn) markup = Inl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | davidchoo12 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width