-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
Steps to reproduce
- Add a bot to a channel that doesn't have post signing.
- Post something to that channel.
- Bot tries to assign a user id to the update, bot gets an AttributeError because there is no user.
Expected behaviour
The bot checks if the user is in the update before trying to get the id.
Actual behaviour
An AttributeError is thrown and the bot fails to process the update.
Configuration
Operating System:
macOS Sierra
Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 6.1.0
urllib3 1.20
certifi 2017.04.17
future 0.16.0
Python 3.6.0 (default, Dec 24 2016, 08:01:42) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
Logs
Traceback (most recent call last):
File "/Users/jelle/.venv/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 264, in process_update
if handler.check_update(update):
File "/Users/jelle/.venv/lib/python3.6/site-packages/telegram/ext/conversationhandler.py", line 181, in check_update
key = self._get_key(update)
File "/Users/jelle/.venv/lib/python3.6/site-packages/telegram/ext/conversationhandler.py", line 164, in _get_key
key.append(user.id)
AttributeError: 'NoneType' object has no attribute 'id'
Metadata
Metadata
Assignees
Labels
No labels