diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 639635e..41df70b 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -1026,10 +1026,11 @@ class VerboseTB(TBTools): head = self.prepare_header(etype, self.long_header) records = self.get_records(etb, number_of_lines_of_context, tb_offset) - frames = self.format_records(records) if records is None: return "" + frames = self.format_records(records) + formatted_exception = self.format_exception(etype, evalue) if records: filepath, lnum = records[-1][1:3]