e-caste / reti-quiz

A script and a Telegram bot to help prepare the Computer Networks exam
https://t.me/networks_quiz_bot
GNU General Public License v3.0
2 stars 4 forks source link

Fix: no from_user attribute #3

Closed e-caste closed 4 years ago

e-caste commented 4 years ago

Traceback:

2020-04-25 11:53:52,459 - telegram.ext.dispatcher - ERROR - An error was raised while processing the update and an uncaught error was raised while handling the error with an error_handler
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 403, in process_update
    self.dispatch_error(update, e)
  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/.local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 390, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/conversationhandler.py", line 381, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "/home/ubuntu/.local/lib/python3.6/site-packages/telegram/ext/handler.py", line 117, in handle_update
    return self.callback(update, context)
  File "/home/ubuntu/reti-quiz/reti_quiz_telegram_bot.py", line 79, in start
    reply = "Hi <b>" + str(update.message.from_user.first_name) + "</b>, welcome to Networks Quiz Bot!"
AttributeError: 'NoneType' object has no attribute 'from_user'