[TIP] Traceback Tracker

Tim Hatch tim at timhatch.com
Sun Mar 29 06:13:15 PDT 2009

Following up on the TIP lightning talk I gave tonight, I give you
Traceback Tracker, whose job it is to parse tracebacks and provide a
standard interface to do things with them (I have one sample
application, but would love to talk about others).

The parts that are finished enough, and you can check out today:

* Parsing a block of text to find a traceback, identifying the offending
lines, files, etc and ignoring most system-specific prefixes.  You can
just iterate the frames in a traceback.
* Finding zip files which, unmodified, could generate that traceback

Source available at http://timhatch.com/projects/tracebacktracker/

For the time being there is a demo server at
http://code.timhatch.com:6001/ that will understand Trac tracebacks from
every released version.  A good sample one is at

Here's how you can help immediately: Send Me Tracebacks, in particular
any that don't work right now. (Word-wrapped, indented, or embedded in
apache error logs are what I'm looking for, but any that you see
commonly are good). You can use::

    bin/tbdump.py $filename

to quickly tell if your traceback already works.

My eventual application of this code is to produce a set of rules of
solutions for certain tracebacks -- the example from the ticket is
getting an OperationalError 1071 after going trac/db/util.py:execute and
mysql stuff on verison 0.10.  But that part is total vaporware.


More information about the testing-in-python mailing list