pazz / alot

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

Alot breaks on empty message #1335

Open varac opened 5 years ago

varac commented 5 years ago

Describe the bug

Sometimes, offlineimap syncs zero bytes messages. I hope this will get fixed soon. Alot fails to open such a message and can't recover from this.

Software Versions

To Reproduce Steps to reproduce the behaviour:

  1. Remove existing message from disk (rm MSG)
  2. Use touch (touch MSG) to create an empty message whith the same name
  3. Try to open this msg in alot

Error Log

INFO:search:open thread view for thread:000000000001bbdc: Cron <root@mail> /usr/local/bin/borgmatic -c /etc/borgmatic/backup.yaml
DEBUG:utils:unquoted header: |root@mail.my.domain (Cron Daemon)|
DEBUG:thread:Tbuffer: auto remove unread tag from msg?
DEBUG:thread:Tbuffer: No, cursor on summary
ERROR:ui:Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 711, in apply_command
    cmd.apply(self)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/commands/search.py", line 42, in apply
    ui.buffer_open(sb)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 405, in buffer_open
    self.buffer_focus(buf)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 465, in buffer_focus
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 353, in calculate_visible
    self._set_focus_complete( (maxcol, maxrow), focus )
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 718, in _set_focus_complete
    (maxcol,maxrow), focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 688, in _set_focus_first_selectable
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'

DEBUG:thread:Tbuffer: auto remove unread tag from msg?
DEBUG:thread:Tbuffer: No, cursor on summary
ERROR:ui:Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 711, in apply_command
    cmd.apply(self)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/commands/search.py", line 42, in apply
    ui.buffer_open(sb)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 405, in buffer_open
    self.buffer_focus(buf)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 465, in buffer_focus
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 353, in calculate_visible
    self._set_focus_complete( (maxcol, maxrow), focus )
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 718, in _set_focus_complete
    (maxcol,maxrow), focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 688, in _set_focus_first_selectable
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 268, in apply_commandline
    await apply_this_command(c)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 713, in apply_command
    self._error_handler(e)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 151, in _error_handler
    self.notify(msg, priority='error')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 612, in notify
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'

DEBUG:thread:Tbuffer: auto remove unread tag from msg?
DEBUG:thread:Tbuffer: No, cursor on summary
ERROR:base_events:Task exception was never retrieved
future: <Task finished coro=<UI._input_filter.<locals>._apply_fire() done, defined at /home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py:184> exception=AttributeError("'NoneType' object has no attribute 'selectable'",)>
Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 711, in apply_command
    cmd.apply(self)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/commands/search.py", line 42, in apply
    ui.buffer_open(sb)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 405, in buffer_open
    self.buffer_focus(buf)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 465, in buffer_focus
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 353, in calculate_visible
    self._set_focus_complete( (maxcol, maxrow), focus )
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 718, in _set_focus_complete
    (maxcol,maxrow), focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 688, in _set_focus_first_selectable
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 268, in apply_commandline
    await apply_this_command(c)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 713, in apply_command
    self._error_handler(e)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 151, in _error_handler
    self.notify(msg, priority='error')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 612, in notify
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 186, in _apply_fire
    await self.apply_commandline(cmdline)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 270, in apply_commandline
    self._error_handler(e)
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 151, in _error_handler
    self.notify(msg, priority='error')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 612, in notify
    self.update()
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/ui.py", line 656, in update
    self.mainloop.draw_screen()
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/main_loop.py", line 586, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/decoration.py", line 226, in render
    canv = self._original_widget.render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1086, in render
    focus and self.focus_part == 'body')
  File "/home/varac/.local/lib/python3.6/site-packages/alot-0.7-py3.6.egg/alot/buffers/thread.py", line 128, in render
    return self.body.render(size, focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 1765, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/widget.py", line 144, in cached_render
    canv = fn(self, size, focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 471, in render
    (maxcol, maxrow), focus=focus)
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/listbox.py", line 416, in calculate_visible
    next, pos = self._body.get_next( pos )
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 82, in get_next
    return self._get(self._tree.next_position(pos))
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 68, in _get
    res = self[pos], pos
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/widgets.py", line 54, in __getitem__
    entry = self._tree.get_decorated(pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 88, in get_decorated
    return self._get_decorated_entry(self._tree, pos)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/nested.py", line 84, in _get_decorated_entry
    entry = tree.decorate(pos[0], entry, is_first=isf)
  File "/home/varac/.local/lib/python3.6/site-packages/urwidtrees/decoration.py", line 472, in decorate
    line = urwid.Columns(cols, box_columns=range(len(cols))[:-1])
  File "/home/varac/.local/lib/python3.6/site-packages/urwid/container.py", line 1768, in __init__
    if focus_column is None and w.selectable():
AttributeError: 'NoneType' object has no attribute 'selectable'
DEBUG:thread:Tbuffer: auto remove unread tag from msg?
DEBUG:thread:Tbuffer: No, cursor on summary
INFO:ui:shut down cleanly
pazz commented 5 years ago

I cannot reproduce this using the steps you mentioned. Has this message been indexed before you remove it? Which urwid version are you on? I use v'2.0.1', installed as python3-urwid on debian testing.

varac commented 5 years ago

I could reproduce this with an incoming 0 byte msg beeing indexed with notmuch, as well as a >0 bytes msg beeing indexed by notmuch, which then gets replaced in the filesystem by a msg of 0 bytes. I'm using python3-urwid: 2.0.1-2build1 as package from ubuntu 18.10.

pazz commented 5 years ago

can you double check if this happens with alot from the current master branch? 0.7 is python2 whereas the upcoming release is python3 only..

pazz commented 5 years ago

oh sorry, I just realized that you said 0.7 but from a recent checkout. hmm