Fix: no effective_message attribute when error is not related to a message
e-caste opened this issue · comments
e-caste commented
Traceback:
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 376, in process_update
self.dispatch_error(None, update)
File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 528, in dispatch_error
callback(update, CallbackContext.from_error(update, error, self))
File "/home/ubuntu/reti-quiz/reti_quiz_telegram_bot.py", line 341, in error
if update.effective_message:
AttributeError: 'NoneType' object has no attribute 'effective_message'
2020-04-24 01:40:43,273 - telegram.ext.updater - ERROR - Error while getting Updates: Bad Gateway
2020-04-24 01:40:43,274 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while handling the error
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 376, in process_update
self.dispatch_error(None, update)
File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 528, in dispatch_error
callback(update, CallbackContext.from_error(update, error, self))
File "/home/ubuntu/reti-quiz/reti_quiz_telegram_bot.py", line 341, in error
if update.effective_message:
AttributeError: 'NoneType' object has no attribute 'effective_message'