Доходит до callback_data и выдает ошибку, так же пробовал напрямую написать без bac но без результатно
Буду благодарен за любую помощь
else :
cb_data = call.data.split("_")
if len(cb_data) >= 2:
if cb_data[0] == "repair" :
n=cb_data[1]
c.execute(f"""SELECT items{n}, items{n}per, items{n}permax,items{n}up FROM user_items WHERE id= :1 """,{'1' : user_id})
repair1=c.fetchall()
for repair2 in repair1:
id_name=repair2[0]
per1=repair2[1]
per_max=repair2[2]
prise=(int(per_max)-int(per1))*2
c.execute(f"""SELECT name FROM items WHERE id= :1 """,{'1' : id_name})
name=c.fetchone()
for name in name:
bac=str('repal_')+str(user_id)+str('_')+str(name)+str('_')+str(per_max)+str('_')+str(n)
mess='u '+str(name)+'з'+str(prise)+''+'?'
repair_ar = types.InlineKeyboardMarkup(1)
repair= types.InlineKeyboardButton(text='О', callback_data=bac)
back = types.InlineKeyboardButton(text="н", callback='blacksmith')
repair_ar.add(repair, back)
await bot.send_message(call.message.chat.id, mess, parse_mode='html', reply_markup=repair_ar)
elif cb_data[0] == "repal" :
cb_data[1]=user_id
cb_data[2]=name
cb_data[3]=per_max
cb_data[4]=n
await repair_last(user_id,name,per_max,n)
вот ошибка
Task exception was never retrieved
future: <Task finished name='Task-16' coro=<Dispatcher._process_polling_updates() done, defined at C:Programs\Python\lib\site-packages\aiogram\dispatcher\dispatcher.py:407> exception=BadRequest("Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard")>
Traceback (most recent call last):
File "C:Programs\Python\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:Programs\Python\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:Programs\Python\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:Programs\Python\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 283, in process_update
return await self.callback_query_handlers.notify(update.callback_query)
File "C:\Programs\Python\lib\site-packages\aiogram\dispatcher\handler.py", line 116, in notify
response = await handler_obj.handler(*args, **partial_data)
File "c:\Program1\bot.telegram\test_bot.python.py", line 682, in callback
await bot.send_message(call.message.chat.id, mess, parse_mode='html', reply_markup=repair_ar)
File "C:Programs\Python\lib\site-packages\aiogram\bot\bot.py", line 339, in send_message
result = await self.request(api.Methods.SEND_MESSAGE, payload)
File "C:Programs\Python\lib\site-packages\aiogram\bot\base.py", line 231, in request
return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
File "C:Programs\Python\lib\site-packages\aiogram\bot\api.py", line 140, in make_request
return check_result(method, response.content_type, response.status, await response.text())
File "C:Programs\Python\lib\site-packages\aiogram\bot\api.py", line 115, in check_result
exceptions.BadRequest.detect(description)
File "C:Programs\Python\lib\site-packages\aiogram\utils\exceptions.py", line 141, in detect
raise cls(description)
aiogram.utils.exceptions.BadRequest: Can't parse inline keyboard button: text buttons are unallowed in the inline keyboard