pazz/alot — Issue #119: StopIteration is raised and kills alot
Author: teythoon
Created: 2011-11-08 09:18:35+00:00
State: open

Not sure how to trigger this one, but I have seen it twice.

```
Traceback (most recent call last):
File "/home/teythoon/.local/bin/alot", line 20, in
main()
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/init.py", line 119, in main
args.colours,
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/ui.py", line 100, in __init__
self.mainloop.run()
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/raw_display.py", line 229, in run_wrapper
return fn()
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 307, in _run
self.event_loop.run()
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 1159, in wrapper
rval = f(*args,**kargs)
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 358, in _update
self.process_input(keys)
File "/home/teythoon/.local/lib/python2.7/site-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 447, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/ui.py", line 63, in keypress
self.ui.apply_command(cmd)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/ui.py", line 447, in apply_command
cmd.apply(self)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/commands/search.py", line 27, in apply
sb = buffers.ThreadBuffer(ui, self.thread)
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/buffers.py", line 191, in __init__
self.rebuild()
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/buffers.py", line 206, in rebuild
self.thread.refresh()
File "/home/teythoon/.local/lib/python2.7/site-packages/alot/db.py", line 202, in refresh
thread = query.search_threads().next()
File "/home/teythoon/.local/lib/python2.7/site-packages/notmuch/thread.py", line 125, in next
raise StopIteration
StopIteration
```