def __str__(self): etype, evalue, etb = self.excinfo formatted = traceback.format_tb(etb) # The level of the tracebacks we want to print is hand crafted :( return repr(evalue) + '\n' + ''.join(formatted[2:])