ischium/xtraceback — Issue #3: KeyError in XTracebackFrame.__init__ method
Author: sniffer
Created: 2011-11-06 20:42:38+00:00
State: open

Occurred while using SQLAlchemy 0.7.3 with mysql and `sessionmaker(twophase=True)` while mysql server was restarted an uncaught error (already submitted a bug report to SQLA trac) in SQLALchemy caused this:

```
Unhandled exception in thread started by >
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 525, in __bootstrap
self.__bootstrap_inner()
File "/usr/lib64/python2.7/threading.py", line 565, in __bootstrap_inner
(self.name, _format_exc()))
File "/usr/lib64/python2.7/traceback.py", line 241, in format_exc
return ''.join(format_exception(etype, value, tb, limit))
File "pyenv/lib/python2.7/site-packages/xtraceback-0.3.2-py2.7.egg/xtraceback/stdlibcompat.py", line 88, in StdlibCompat.format_exception
xtb = self._factory(etype, value, tb, limit, **options)
File "pyenv/lib/python2.7/site-packages/xtraceback-0.3.2-py2.7.egg/xtraceback/stdlibcompat.py", line 73, in StdlibCompat._factory
return XTraceback(etype, value, tb, **_options)
File "pyenv/lib/python2.7/site-packages/xtraceback-0.3.2-py2.7.egg/xtraceback/xtraceback.py", line 125, in XTraceback.__init__
frame = XTracebackFrame(self, tb.tb_frame, frame_info, i)
File "pyenv/lib/python2.7/site-packages/xtraceback-0.3.2-py2.7.egg/xtraceback/xtracebackframe.py", line 60, in XTracebackFrame.__init__
cls = self.frame.f_locals[self.args[0]]
KeyError: 'connection'
```