Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/set_lang's buttons do not work #7

Closed
mhthies opened this issue May 2, 2020 · 0 comments
Closed

/set_lang's buttons do not work #7

mhthies opened this issue May 2, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mhthies
Copy link
Owner

mhthies commented May 2, 2020

When clicking a language button of the /set_lang inline keyboard, the following exception is logged:

qaqa_bot.bot - ERROR - Error while update {'update_id': 570115936, 'callback_query': {'id': '356326171076547235', 'chat_instance': '<snip>', 'message': {'message_id': 19, 'date': 1588425785, 'chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, 'text': 'Please choose:', 'entities': [], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'reply_markup': {'inline_keyboard': [[{'text': '🇩🇪', 'callback_data': 'de'}, {'text': '🇬🇧', 'callback_data': 'en'}]]}, 'from': {'id': 1223479557, 'first_name': 'QAQA-Test-Bot (Michael)', 'is_bot': True, 'username': 'qaqagame_michael_test_bot'}}, 'data': 'en', 'from': {'id': <snip>, 'first_name': '<snip>', 'is_bot': False, 'last_name': '<snip>', 'username': '<snip>', 'language_code': 'de'}}, '_effective_user': {'id': <snip>, 'first_name': '<snip>', 'is_bot': False, 'last_name': '<snip>', 'username': '<snip>', 'language_code': 'de'}, '_effective_chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, '_effective_message': {'message_id': 19, 'date': 1588425785, 'chat': {'id': <snip>, 'type': 'private', 'username': '<snip>', 'first_name': '<snip>', 'last_name': '<snip>'}, 'text': 'Please choose:', 'entities': [], 'caption_entities': [], 'photo': [], 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'reply_markup': {'inline_keyboard': [[{'text': '🇩🇪', 'callback_data': 'de'}, {'text': '🇬🇧', 'callback_data': 'en'}]]}, 'from': {'id': 1223479557, 'first_name': 'QAQA-Test-Bot (Michael)', 'is_bot': True, 'username': 'qaqagame_michael_test_bot'}}}
Traceback (most recent call last):
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/venv/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 343, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/venv/lib/python3.8/site-packages/telegram/ext/handler.py", line 117, in handle_update
    return self.callback(update, context)
  File "/home/michael/Documents/Freizeit/Programme/python/QAQAbot/qaqa_bot/bot.py", line 235, in button
    command = query.message.reply_to_message.text
AttributeError: 'NoneType' object has no attribute 'text'
@mhthies mhthies added the bug Something isn't working label May 2, 2020
@Feanya Feanya self-assigned this May 2, 2020
@Feanya Feanya closed this as completed in e5718d9 May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants