You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An user reported this crash on the Telegram group:
Traceback (most recent call last):
File "C:\...\botogram\runner\processes.py", line 54, in run
self.loop()
File "C:\...\botogram\runner\processes.py", line 207, in loop
if update.message.date < self.started_at:
AttributeError: 'NoneType' object has no attribute 'date'
botogram version: 0.2.1
The text was updated successfully, but these errors were encountered:
Apparently this has to do with edited messages, which creates trouble in botogram 0.2. Another traceback:
Traceback (most recent call last):
File "/.../botogram/runner/processes.py", line 54, in run
self.loop()
File "/.../botogram/runner/processes.py", line 158, in loop
job.process(self.bots)
File "/.../botogram/runner/jobs.py", line 87, in process
return self.func(bot, self.metadata)
File "/.../botogram/runner/jobs.py", line 96, in process_update
bot.process(update)
File "/.../botogram/frozenbot.py", line 144, in process
result = hook.call(self, update)
File "/.../botogram/hooks.py", line 43, in call
if self._only_texts and update.message.text is None:
pietroalbini
changed the title
Crash with botogram 0.2.1
botogram 0.2.x crashes with edited messages
Jul 2, 2016
The Bot API 2.1 update (not supported by botogram 0.2.x) introduced a
new kind of Update when someone edits a message the bot knows about.
This allows to create cool things, but it isn't supported by botogram
0.2.x, since support for it was added in botogram 0.3.1.
Unfortunately, this meant botogram crashed when it received that kind
of update. This commit ignores every update other than the ones it
supports, so the fix lasts even for new kind of updates not introduced
yet.
Fixes: GH-70
An user reported this crash on the Telegram group:
botogram version: 0.2.1
The text was updated successfully, but these errors were encountered: