zulip-terminal
zulip-terminal copied to clipboard
Adding new stream throws an Keyerror
Whenever an admin adds an extra stream in the server , an error is thrown if a message in received the newly added stream as : Screenshot
Traceback :
Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/home/aryanshridhar/Desktop/zulip-terminal-env/zulip-terminal/zulipterminal/model.py", line 1194, in poll_for_events self.event_actions[event['type']](event) File "/home/aryanshridhar/Desktop/zulip-terminal-env/zulip-terminal/zulipterminal/model.py", line 918, in _handle_message_event set_count([message['id']], self.controller, 1) File "/home/aryanshridhar/Desktop/zulip-terminal-env/zulip-terminal/zulipterminal/helper.py", line 249, in set_count _set_count_in_view(controller, new_count, changed_messages, unread_counts) File "/home/aryanshridhar/Desktop/zulip-terminal-env/zulip-terminal/zulipterminal/helper.py", line 214, in _set_count_in_view if controller.model.is_muted_topic(stream_id, msg_topic): File "/home/aryanshridhar/Desktop/zulip-terminal-env/zulip-terminal/zulipterminal/model.py", line 474, in is_muted_topic stream_name = self.stream_dict[stream_id]['name'] KeyError: 263064
To reproduce :
- Create a new stream in the server .
- Add (
Reply/New topic
) an message in the newly created stream . - Checkout the zulip terminal (which was active throughout the process) .
Zulip-version :
$ zulip-term -v Zulip Terminal 0.5.2
@aryanshridhar Thanks for the bug report! We definitely don't handle certain stream events, so I expect this could be related to that.
What version of zulip-terminal are you running?
Oh Fine @neiljp , I have updated the issue with the same .
@aryanshridhar I've not tested your case against the latest development version of ZT in git, but it may be more stable - I know we added some checks for unsubscribed streams at least.
It is still possible that this bug exists in the git version however, and certainly won't currently update the list of streams subscribed to - we need to handle more stream events in any case. I was looking into this in the last week or so.
Yup , The error exists in the git version as well .
$ zulip-term -v Zulip Terminal 0.5.2+git
@neiljp what's the status of this issue? Can I work on this?
@zulipbot claim
@theViz343 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!
@theViz343 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!