@Zoomf192

Ошибка expected expect or finally block.Как решить?

Прошу помочь с решением
Код:

if db[message.from_user.id]['num'] == 'opl' and next_stape == True:
      
        db[message.from_user.id]['num'] = 0
        await inline_method.write('supp_btn_222', db)
      
        try:
            await bot.send_message(chat_id=db[message.from_user.id]['ref'],
                                       text=f'<b>‍  @{message.from_user.username} нажал на кнопку <ОПЛАТИЛ> </b>',
                                       parse_mode='html')
          

if name == "main":
    executor.start_polling(dp, skip_updates=True)


Ошибка:
File “main.py”, line 881
if __name__ == “__main__”:
SyntaxError: expected ‘expect’ or finally block
  • Вопрос задан
  • 578 просмотров
Решения вопроса 1
Frostealth
@Frostealth
Backend Developer
Исключения в python
try:
    # your code
except ExceptedException as exc:
    # handle the exception
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы