Syntax error is coming

import logging
from telegram.ext import Updater, CommandHandler, MessageHandler , Filters

logging.basicConfig(format = ‘%(asctime)s - %(name)s - %(levelname)s - %(message)s’, level = logging.INFO)
logger = logging.getLogger(name)

TOKEN = “1361877057:AAG9TySjrEKBIV9k3feY2WJZXcbsd7ToZqo”

def start(bot,update):
print(update)
author = update.message.from_user.first_name
reply = “Hi! {}”.format(author)
bot.send_message(chat_id = update.message.chat_id, text = reply)

def _help(bot,update):
help_text = “Hey! This is a help text. This chatbot is created by Srishti Jhunthra.”
bot.send_message(chat_id = update.message.chat_id, text = help_text)

def echo(bot,update):
reply = update.message.text
bot.send_message(chat_id = update.message.chat_id, text = reply)

def echo_sticker(bot,update):
bot.send_sticker(chat_id = update.message.chat_id, sticker = update.message.sticker.file_id)

def error(bot,update):
logger.error(“Update ‘%s’ has caused error ‘%s’”,update,update.error)

def main():
updater = Updater(TOKEN)
dp = updater.dispatcher
dp.add_handler(CommandHandler(“start”,start))
dp.add_handler(CommandHandler(“help”, _help)
dp.add_handler(MessageHandler(Filters.sticker, echo_sticker))
dp.add_handler(MessageHandler(Filters.text,echo))
dp.add_error_handler(error)

update.start_polling()
logger.info("Started polling....")
updater.idle()

if name == “main”:
main()

This is my telegram bot code. When I am running this code on my virtual machine. It says that there is a syntax error in:
dp.add_handler(MessageHandler(Filters.text,echo))

Can you please tell me why there is a syntax error here?

hey @jhunthrasrishti ,
can you please share your code file.
Currently here i am not able to understand the indentation and cannot debug too.

Thank You :slightly_smiling_face:

Drive link which contains the code

@prashant_ml sir, I have shared the drive link which contains the code file. Please check.
Also here is the screenshot of the error I am getting.

hey @jhunthrasrishti,
there is one ending bracket missing in command dp.add_handler(CommandHandler("help", _help) , at line number 34 .
Add another bracket at the end
It will work fine.

I hope this helps you :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.