pythonitalia / python-italy-telegram-bot

Modular telegram group management bot, used for the Python Italia telegram group
https://www.python.it/comunita/
GNU General Public License v3.0
16 stars 7 forks source link

[BUG] Fix markdown #3

Closed MattiaFailla closed 5 years ago

MattiaFailla commented 5 years ago

The markdown help module needs a review due to internal server error while handling the response message for the command /markdownhelp

The following error is raised:

Traceback (most recent call last): File "/home/USER/.local/lib/python3.6/site-packages/telegram/utils/promise.py", line 57, in run self._result = self.pooled_function(*self.args, **self.kwargs) File "/home/USER/modules/misc.py", line 348, in markdown_help update.effective_message.reply_text(MARKDOWN_HELP, parse_mode=ParseMode.HTML) File "/home/USER/.local/lib/python3.6/site-packages/telegram/message.py", line 455, in reply_text return self.bot.send_message(self.chat_id, *args, **kwargs) File "/home/USER/.local/lib/python3.6/site-packages/telegram/bot.py", line 65, in decorator result = func(self, *args, **kwargs) File "/home/USER/.local/lib/python3.6/site-packages/telegram/bot.py", line 90, in decorator result = self._request.post(url, data, timeout=kwargs.get('timeout')) File "/home/USER/.local/lib/python3.6/site-packages/telegram/utils/request.py", line 309, in post headers={'Content-Type': 'application/json'}) File "/home/USER/.local/lib/python3.6/site-packages/telegram/utils/request.py", line 223, in _request_wrapper raise BadRequest(message) telegram.error.BadRequest: Can't parse entities: unclosed end tag at byte offset 247

We need to fix this bug to guarantee no errors while handling reply from tgbot.

Kavuti commented 5 years ago

Ho alcune domande da porre in merito:

Soprattutto porrei attenzione sull'ultima domanda. Una volta che risolviamo, magari un giorno potrebbe essere utile a qualcun altro, anche integrando la nostra soluzione a tgbot originale con una pull request.

MattiaFailla commented 5 years ago

Rispondendo alle tue domande:

iflare3g commented 5 years ago

Proverò a cercare anche io, se lo risolvo farò PR

MattiaFailla commented 5 years ago

Problema risolto disattivando il comando. Il problema non si presenta più. Chiudo issue