Traceback (most recent
call last):
File "<stdin>", line 1, in <module>
File "/bin/pythonanywhere_runner.py", line 26, in _pa_run
code = compile(f.read(), filename.encode("utf8"), "exec")
File "/home/Ezizdjdkso/main.py", line 72
text=f'❕ Выберите нужный товар',
^
SyntaxError: invalid syntax
>>>
# Main menu
if call.data == 'catalog':
bot.edit_message_text(
chat_id=chat_id,
message_id=message_id,
text='Каталог',
reply_markup=func.menu_catalog()
)
if call.data == 'exit_from_catalog':
bot.edit_message_text(
chat_id=chat_id,
message_id=message_id,
text='Вы вернулись назад',
reply_markup=menu.main_menu
)
if call.data in func.list_sections():
name = call.data
product = func.Product(chat_id)
product_dict[call.message.chat.id] = product
product.section = name
bot.edit_message_text(
chat_id=chat_id,
message_id=message_id,
text=f'❕ Выберите нужный товар',
reply_markup=func.menu_section(call.data)
)
if call.data in func.list_product():
conn = sqlite3.connect("base_ts.sqlite")
cursor = conn.cursor()
cursor.execute(f'SELECT * FROM "{call.data}"')
row = cursor.fetchall()
if len(row) > 0:
product = func.Product(chat_id)
product_dict[chat_id] = product
product = product_dict[chat_id]
info = func.menu_product(call.data, product)
product.product = info[1].product
product.section = info[1].section
product.amount_MAX = info[1].amount_MAX
product.price = info[1].price
bot.edit_message_text(
chat_id=chat_id,
message_id=message_id,
text=info[0],
reply_markup=menu.btn_purchase
)