shanginn / py_telegram_notifier

Python Telegram bot notifier.
3 stars 0 forks source link

Transition to Version 11.0 #2

Open Inoplanityanin opened 6 years ago

Inoplanityanin commented 6 years ago

HI, first of all thank you for youre great job, may i kindly ask you to make the transition to Version 11.0 of python-telegram-bot, because i don't have idea what to change and where,thank you in advance.

Link : https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-11.0

shanginn commented 6 years ago

Hello there. Have you tried to run this with telegram bot 11?

Inoplanityanin commented 6 years ago

yes, when i try to start it, i receive an error

python bot.py bot.py:109: TelegramDeprecationWarning: Old Handler API is deprecated - see https://git.io/vp113 for details updater = Updater(config['token'])

Inoplanityanin commented 6 years ago

so, i changed the line

def main(): updater = Updater(config['token'],use_context=True )

bot run, but when i try in telegram to /start or /cat . it doesn't do anything, i put below the error from bot.log

2018-05-24 17:44:18,407 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update Traceback (most recent call last): File "C:\Python27\lib\site-packages\python_telegram_bot-10.1.0-py2.7.egg\telegram\ext\dispatcher.py", line 298, in process_update handler.handle_update(update, self, check) File "C:\Python27\lib\site-packages\python_telegram_bot-10.1.0-py2.7.egg\telegram\ext\handler.py", line 119, in handle_update return self.callback(update, context) TypeError: start() takes exactly 3 arguments (2 given)

2018-05-24 17:44:28,282 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update Traceback (most recent call last): File "C:\Python27\lib\site-packages\python_telegram_bot-10.1.0-py2.7.egg\telegram\ext\dispatcher.py", line 298, in process_update handler.handle_update(update, self, check) File "C:\Python27\lib\site-packages\python_telegram_bot-10.1.0-py2.7.egg\telegram\ext\handler.py", line 119, in handle_update return self.callback(update, context) File "bot.py", line 102, in cat cat_file(bot, update.message.chat_id, file_name) AttributeError: 'CallbackContext' object has no attribute 'message'