I make a telegram bot with telebot in python, but I got an error that I have textbutton, although I have use InlineKeyboardButton, why?

thats my code in image

thats cut of my code:

keyboard = types.InlineKeyboardMarkup(row_width=2) # вывод кнопок в 1 колонку
    btn_1 = types.InlineKeyboardButton(bookmarks_categories[0], callback_data=0)
    btn_2 = types.InlineKeyboardButton(bookmarks_categories[1], callback_data=1)
    btn_3 = types.InlineKeyboardButton(bookmarks_categories[2], callback_data=2)
    bot.send_message(message.chat.id, 'Вывод inline-клавиатуры', reply_markup=keyboard)

thats my error:

2021-08-28 00:11:29,741 (__init__.py:652 MainThread) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: can't parse inline keyboard button: Text buttons are unallowed in the inline keyboard"

how can i solve this problem?


you can check this solution, I have done a project by multiple keyboards such as inline_keyboards and Reply_keyboards, I used telegram library

from telegram import (InlineKeyboardButton, InlineKeyboardMarkup)

for inline keyboards buttons you can identify keyboard buttons first in this way:

buttons = [

then identify your keyboard like this:

keyboard = InlineKeyboardMarkup(buttons)