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.message.reply_text('message with inline button', reply_markup=markup)
- Output of the print statement:
{'text': 'inline button'}
along with error message: "Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard"
Expected behaviour
The message should appear with the button as documented: "Can be empty, in which case just the bot’s username will be inserted."
Actual behaviour
Message and button doesn't appear and error is thrown
Configuration
Operating System:
Windows 10
Version of Python, python-telegram-bot & dependencies:
$ python -m telegram
python-telegram-bot 12.2.0
certifi 2019.09.11
future 0.18.1
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)]
Logs
{'text': 'inline button'}
WARNING - Update "..." caused error "Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard"