-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Milestone
Description
After installing python-telegram-bot through pip, the example code doesn't run. Specifically, the examples now use
update.message.reply_text('Hi!')
to send messages, while the version in PyPI still needs
bot.sendMessage(update.message.chat_id, text='Hi!')
I suggest that
- the PyPI package should be updated to reflect the latest version of this library
- instructions for installing from source should be added to README.md
Steps to reproduce
- pip install python-telegram-bot
- create echobot2 and insert code from examples folder
- python echobot2.py
- send message to bot
Expected behaviour
echobot should reply with same message
Actual behaviour
echo bot throws error
(test) nsbot@nstravel:~/git/NSGroupTickets/NSBot$ python echobot2.py
2016-09-23 14:56:00,713 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update
Traceback (most recent call last):
File "/home/nsbot/VEs/test/lib/python3.5/site-packages/telegram/ext/dispatcher.py", line 203, in process_update
handler.handle_update(update, self)
File "/home/nsbot/VEs/test/lib/python3.5/site-packages/telegram/ext/messagehandler.py", line 139, in handle_update
return self.callback(dispatcher.bot, update, **optional_args)
File "echobot2.py", line 41, in echo
update.message.reply_text(update.message.text)
AttributeError: 'Message' object has no attribute 'reply_text'
Configuration
Ubuntu 16.04
Version of Python, python-telegram-bot & dependencies:
$ python -m telegram
(test) nsbot@nstravel:~/git/NSGroupTickets/NSBot$ python -m telegram
python-telegram-bot 5.0.0
urllib3 1.17
certifi 2016.08.31
future 0.15.2
Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609]
Logs
Insert logs here (if necessary)
Metadata
Metadata
Assignees
Labels
No labels