pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
697 stars 165 forks source link

LookupError when displaying inbox with notmuch backend #1613

Closed matclab closed 1 year ago

matclab commented 1 year ago

Describe the bug When openning alot I get somme errors. The log says :

  File "/usr/lib/python3.10/site-packages/alot/ui.py", line 723, in apply_command
    cmd.apply(self)
  File "/usr/lib/python3.10/site-packages/alot/commands/globals.py", line 125, in apply
    ui.buffer_open(buffers.SearchBuffer(ui, self.query,
  File "/usr/lib/python3.10/site-packages/alot/ui.py", line 417, in buffer_open
    self.buffer_focus(buf)
  File "/usr/lib/python3.10/site-packages/alot/ui.py", line 466, in buffer_focus
    prehook(ui=self, dbm=self.dbman, buf=buf)
  File "/home/clabaut/.config/alot/hooks.py", line 22, in pre_buffer_focus
    buf.rebuild()
  File "/usr/lib/python3.10/site-packages/alot/buffers/search.py", line 60, in rebuild
    selected_thread = self.get_selected_thread()
  File "/usr/lib/python3.10/site-packages/alot/buffers/search.py", line 92, in get_selected_thread
    threadlinewidget = self.get_selected_threadline()
  File "/usr/lib/python3.10/site-packages/alot/buffers/search.py", line 87, in get_selected_threadline
    threadlinewidget, _ = self.threadlist.get_focus()
  File "/usr/lib/python3.10/site-packages/alot/walker.py", line 39, in get_focus
    return self._get_at_pos(self.focus)
  File "/usr/lib/python3.10/site-packages/alot/walker.py", line 72, in _get_at_pos
    widget = self._get_next_item()
  File "/usr/lib/python3.10/site-packages/alot/walker.py", line 85, in _get_next_item
    next_widget = self.containerclass(next_obj, **self.kwargs)
  File "/usr/lib/python3.10/site-packages/alot/widgets/search.py", line 26, in __init__
    self.rebuild()
  File "/usr/lib/python3.10/site-packages/alot/widgets/search.py", line 32, in rebuild
    self.thread = self.dbman.get_thread(self.tid)
  File "/usr/lib/python3.10/site-packages/alot/db/manager.py", line 287, in get_thread
    return Thread(self, thread)
  File "/usr/lib/python3.10/site-packages/alot/db/thread.py", line 31, in __init__
    self.refresh(thread)
  File "/usr/lib/python3.10/site-packages/alot/db/thread.py", line 39, in refresh
    self._refresh(thread)
  File "/usr/lib/python3.10/site-packages/alot/db/thread.py", line 51, in _refresh
    subject = first_msg.header('subject')
  File "/usr/lib/python3.10/site-packages/notmuch2/_message.py", line 266, in header
    raise LookupError
LookupError

Software Versions

To Reproduce Steps to reproduce the behaviour:

  1. open inbox buffer

Error Log See here before

matclab commented 1 year ago

Similar to #1548.