Skip to content

Crash due to KeyError exception #1271

Open
@jonjensen

Description

@jonjensen

Sorry to be a pest, but I've had two cases of another error happen today. This time zulip-term doesn't crash, but it shows a TUI modal on the screen:

NOTICE

An exception occurred:

KeyError: 225

The application should continue functioning, but you may notice inconsistent
behavior in this session.

Please report this to us either in
* the #zulip-terminal stream
  (https://chat.zulip.org/#narrow/stream/206-zulip-terminal in the webapp)
* an issue at https://github.com/zulip/zulip-terminal/issues

Details of the exception can be found in zulip-terminal-thread-exceptions.log

When I press escape it goes away and the program keeps working seemingly fine.

The contents of that log file:

Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1536, in _handle_message_event
    set_count([message["id"]], self.controller, 1)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1715, in _handle_update_message_flags_event
    set_count(
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1536, in _handle_message_event
    set_count([message["id"]], self.controller, 1)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1536, in _handle_message_event
    set_count([message["id"]], self.controller, 1)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1715, in _handle_update_message_flags_event
    set_count(
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1536, in _handle_message_event
    set_count([message["id"]], self.controller, 1)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1715, in _handle_update_message_flags_event
    set_count(
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1536, in _handle_message_event
    set_count([message["id"]], self.controller, 1)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225
Traceback (most recent call last):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1924, in poll_for_events
    self.event_actions[event["type"]](event)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 1715, in _handle_update_message_flags_event
    set_count(
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 267, in set_count
    _set_count_in_view(controller, new_count, changed_messages, unread_counts)
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/helper.py", line 233, in _set_count_in_view
    if controller.model.is_muted_topic(stream_id, msg_topic):
  File "/home/jon/zt_venv/lib64/python3.10/site-packages/zulipterminal/model.py", line 879, in is_muted_topic
    stream_name = self.stream_dict[stream_id]["name"]
KeyError: 225

Both times this happened to me I wasn't actively using that terminal window, but I may have typed something odd passing it as I changed virtual desktops in Awesome window manager.

The terminal I'm using is Alacritty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions