-1
> """TypeError                                 Traceback (most recent call last)
> c:\Users\Sharif\Desktop\py\pybot.py in line 85
> 82     updater.idle()
> 84 if __name__ == '__main__':
> 85     main()
> 
> c:\Users\Sharif\Desktop\py\pybot.py in line 61, in main()
> 59 def main():
> 60     # Create an instance of Updater with the received token
> 61     updater = Updater(token='token', use _context=True)
> 63     # Create a dispatcher for the bot
> 64     dispatcher = updater .dispatcher
> 
> 
> 
> Type Error: Updater.__init__() got an unexpected keyword argument 'token'"""

The following error was from a Telegram bot script. My script is experiencing an unexpected keyword argument and I don't understand why.

kggn
  • 73
  • 1
  • 8
ngin_8
  • 1
  • don't you read the post before you press send and see that it is not what you want – rioV8 Jul 17 '23 at 23:39
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 18 '23 at 00:11

1 Answers1

0

It might be a version problem, try to install python-telegram-bot version compatible with your code. You seem to have installed latest version of the package where the only arguments and attributes are now bot and update_queue based on the documentation.

dev0717
  • 177
  • 4