gelin / calendar-bot

Telegram bot to post events notifications from calendars
GNU General Public License v3.0
29 stars 8 forks source link

Error when reading message from channel #15

Open gelin opened 6 years ago

gelin commented 6 years ago

Original report by Denis Nelubin (Bitbucket: gelin, GitHub: gelin).


Send a command-like message /help to the channel where bot posts its notifications. This error appears:

2018-02-23 19:07:38,283 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/telegram/ext/dispatcher.py", line 279, in process_update
    handler.handle_update(update, self)
  File "/usr/local/lib/python3.5/dist-packages/telegram/ext/messagehandler.py", line 169, in handle_update
    return self.callback(dispatcher.bot, update, **optional_args)
  File "/home/gelin/work/bitbucket/calendar-bot/calbot/bot.py", line 172, in unknown
    bot.sendMessage(chat_id=update.message.chat_id, text="Sorry, I don't understand that command.")
AttributeError: 'NoneType' object has no attribute 'chat_id'