Nic0/tyrs — Issue #114: IndexError in Timeline when retrieving new events.
Author: kezabelle
Created: 2012-01-04 21:34:33+00:00
State: open

Can't easily figure out how to re-produce it, short of writing some abstruse testcase to demonstrate that somehow, there can exist a discrepancy between what's in ```self.walker``` and ```retreive``` that can result in the following traceback, specifically when enumerating over ```retreive``` and testing the id isn't seen in ```self.walker```

```
File "build/bdist.macosx-10.6-universal/egg/tyrs/tyrs.py", line 66, in main
File "build/bdist.macosx-10.6-universal/egg/tyrs/tyrs.py", line 71, in init_tyrs
File "build/bdist.macosx-10.6-universal/egg/tyrs/tyrs.py", line 88, in init_interface
File "build/bdist.macosx-10.6-universal/egg/tyrs/interface.py", line 49, in __init__
File "build/bdist.macosx-10.6-universal/egg/tyrs/interface.py", line 62, in main_loop
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 170, in run
self.screen.run_wrapper(self._run)
File "/Library/Python/2.6/site-packages/urwid/raw_display.py", line 234, in run_wrapper
return fn()
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 188, in _run
self.event_loop.run()
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 498, in run
self._loop()
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 523, in _loop
self._watch_files[fd]()
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 234, in _update
self.process_input(keys)
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 323, in process_input
self.unhandled_input(k)
File "/Library/Python/2.6/site-packages/urwid/main_loop.py", line 350, in unhandled_input
return self._unhandled_input(input)
File "build/bdist.macosx-10.6-universal/egg/tyrs/keys.py", line 53, in keystroke
File "build/bdist.macosx-10.6-universal/egg/tyrs/tweets.py", line 210, in update_timeline
File "build/bdist.macosx-10.6-universal/egg/tyrs/timeline.py", line 42, in append_new_statuses
File "build/bdist.macosx-10.6-universal/egg/tyrs/timeline.py", line 53, in add_to_walker
IndexError: list index out of range
```
Sidenote: both ```append_new_statuses``` and ```add_to_walker``` use a local variable called ```retreive```, a typo for _retrieve_.

This was experienced against __master__, with all dependencies (except setuptools) being freshly installed when doing ```python setup.py install```