pazz/alot — Issue #362: Crash when trying to completion of 'To'
Author: triumhiz
Created: 2012-02-25 17:47:34+00:00
State: open

Reproducable: completion is not configured at all (in config file), no related software is installed.

Reproduce:
1. 'm' to compose new message; to select default 'From' value
2.

Result: alot crashes with:

Traceback (most recent call last):
File "/usr/bin/alot-2.7", line 20, in
main()
File "/usr/lib64/python2.7/site-packages/alot/init.py", line 180, in main
UI(dbman, cmd)
File "/usr/lib64/python2.7/site-packages/alot/ui.py", line 101, in __init__
self.mainloop.run()
File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/usr/lib64/python2.7/site-packages/urwid/raw_display.py", line 237, in run_wrapper
return fn()
File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 307, in _run
self.event_loop.run()
File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 1159, in wrapper
rval = f(*args,**kargs)
File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 358, in _update
self.process_input(keys)
File "/usr/lib64/python2.7/site-packages/urwid/main_loop.py", line 447, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/usr/lib64/python2.7/site-packages/alot/ui.py", line 57, in keypress
return self._w.keypress(size, key)
File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 373, in keypress
*self.calculate_padding_filler(size, True)), key)
File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 1390, in keypress
key = w.keypress( (mc,)+size[1:], key )
File "/usr/lib64/python2.7/site-packages/alot/widgets.py", line 309, in keypress
self.completer.complete(self.edit_text, self.edit_pos)
File "/usr/lib64/python2.7/site-packages/alot/completion.py", line 91, in complete
for c, p in self._completer.complete(mypart, mypos):
File "/usr/lib64/python2.7/site-packages/alot/completion.py", line 198, in complete
res = res + abook.lookup(prefix)
File "/usr/lib64/python2.7/site-packages/alot/account.py", line 265, in lookup
cmdlist = shlex.split(self.command.encode('utf-8', errors='ignore'))
AttributeError: 'NoneType' object has no attribute 'encode'