zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Crash on startup: IndexError: Can't set focus, ListBox is empty

Open aniketd opened this issue 9 months ago • 2 comments

Bug description

The process terminates with a unrecoverable error soon after start up.

Below is the terminal output.

~
❯ zulip-term
zuliprc file was not found at /home/xxx/zuliprc
Please enter your credentials to login into your Zulip organization.

NOTE: The Zulip URL is where you would go in a web browser to log in to Zulip.
It often looks like one of the following:
   your-org.zulipchat.com (Zulip cloud)
   zulip.your-org.com (self-hosted servers)
   chat.zulip.org (the Zulip community server)
Zulip URL: zsf.zulipchat.com
Email: [email protected]
Password:
Generated API key saved at /home/xxx/zuliprc
Loading with:
   theme 'zt_dark' specified with no config.
   autohide setting 'no_autohide' specified with no config.
   maximum footlinks value '3' specified with no config.
   color depth setting '256' specified with no config.
   notify setting 'disabled' specified with no config.
Welcome to Zulip.
Loading |
Zulip Terminal has crashed!
Please refer to zulip-terminal-tracebacks.log for full log of the error.
You can ask for help at:
https://chat.zulip.org/#narrow/stream/206-zulip-terminal

Thanks for using the Zulip-Terminal interface.

How is the bug triggered?

How can you reproduce the bug?

  1. Just start the process using the zulip-term command.

Does it produce a 'traceback' or 'exception'?

# contents of zulip-terminal-tracebacks.log

{e}


Can't set focus, ListBox is empty
Traceback (most recent call last):
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/cli/run.py", line 500, in main
    Controller(
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/core.py", line 85, in __init__
    self.view = View(self)
                ^^^^^^^^^^
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/ui.py", line 46, in __init__
    super().__init__(self.main_window())
                     ^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/ui.py", line 146, in main_window
    self.center_panel = self.middle_column_view()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/ui.py", line 56, in middle_column_view
    self.middle_column = MiddleColumnView(
                         ^^^^^^^^^^^^^^^^^
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/ui_tools/views.py", line 546, in __init__
    message_view = MessageView(model, view)
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/f2pvivcmcpp4w1gsr8rarymg37wcqg7g-zulip-term-0.7.0/lib/python3.12/site-packages/zulipterminal/ui_tools/views.py", line 109, in __init__
    self.set_focus(self.focus_msg)
  File "/nix/store/6p28k5hblv912zjrwpchmcm2xv2lhzz0-python3.12-urwid-2.1.2/lib/python3.12/site-packages/urwid/listbox.py", line 619, in set_focus
    raise IndexError("Can't set focus, ListBox is empty")
IndexError: Can't set focus, ListBox is empty

How are you running the application?

Please include as many of the following as possible:

  • Zulip-terminal version: 0.7.0 eg. a specific version (0.7.0), or if running from main also ideally the git ref
  • Zulip server version(s): NA eg. Zulip Cloud, the version you are running self-hosted, or the Zulip Community server (chat.zulip.org)
  • Operating system (and version): nixos eg. Debian Linux, Ubuntu Linux, macOS, WSL in Windows, Docker
  • Python version (and implementation): NA (python --version says command not found) eg. 3.8, 3.9, 3.10, ... (implementation is likely to be eg. CPython, or PyPy)

If possible, please provide details from the About menu: (hotkey: Meta + ?) (this can provide some of the details above)

aniketd avatar Feb 27 '25 13:02 aniketd

I would like to work on this issue. Could you please assign it to me? @aniketd

12jatin avatar Mar 20 '25 19:03 12jatin

claim

abdallhfattah avatar Mar 21 '25 14:03 abdallhfattah