-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Steps to reproduce
-
Create an
Updaterwith a valid bot token. -
Call
bot.sendMessagewhich will raise a BadRequest, such as withparse_mode="HTML"andtext="<b>"(unclosed tag) -
Catch the exception and read it.
except BadRequest as e: look_at(e.message)
Expected behaviour
BadRequest message should say: Can't parse message text: Can't found end tag corresponding to start tag at byte offset 0
Actual behaviour
BadReqeust message actually says: u"Bad Request: Can't parse message text: Can't found end tag corresponding to start tag at byte offset 0" (notice it's literally surrounded with u" ")
Configuration
Operating System:
Debian
Version of Python, python-telegram-bot & dependencies:
$ python -m telegram
python-telegram-bot 5.2.0
urllib3 1.19.1
certifi 2016.09.26
future 0.16.0
Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
Notes
Notice the repr(message):
Should the repr call be removed, or should message have another format?