Module Expr Str Import alias alias alias ImportFrom alias ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Return BinOpMod Str TupleLoad NameLoad NameLoad orelse Return BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad Str Num If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore BoolOpOr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If Call NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Import alias Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body If CompareIsNot SubscriptLoad NameLoad Index Num NameLoad body Expr Yield TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Expr Yield Call NameLoad SubscriptLoad NameLoad Slice Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Import alias Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameStore NameLoad body If UnaryOpNot NameLoad body Assign NameStore Str TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BoolOpOr AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Continue Assign NameStore NameStore Num Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num AugAssignAdd NameStore Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index NameLoad TupleLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareLtE NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index BinOpSub NameLoad Num orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num Num Num body If SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num body Assign AttributeStore NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Assign AttributeStore NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Break orelse If NameLoad body TryExcept body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str Import alias Return Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args defaults body Expr Str Import alias Return Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Call AttributeLoad NameLoad attr keyword Str decorator_list
N/A N/A exception classes N/A traceback sys re mako util MakoException N/A Exception N/A N/A N/A RuntimeException N/A MakoException N/A N/A N/A _format_filepos N/A N/A lineno pos filename N/A N/A N/A N/A filename None N/A N/A N/A  at line: %d char: %d N/A lineno pos N/A N/A N/A  in file '%s' at line: %d char: %d N/A filename lineno pos N/A CompileException N/A MakoException N/A __init__ N/A N/A self message source lineno pos filename N/A N/A N/A N/A N/A MakoException __init__ self N/A message N/A _format_filepos lineno pos filename N/A N/A self lineno lineno N/A N/A self pos pos N/A N/A self filename filename N/A N/A self source source N/A N/A SyntaxException N/A MakoException N/A __init__ N/A N/A self message source lineno pos filename N/A N/A N/A N/A N/A MakoException __init__ self N/A message N/A _format_filepos lineno pos filename N/A N/A self lineno lineno N/A N/A self pos pos N/A N/A self filename filename N/A N/A self source source N/A N/A UnsupportedError N/A MakoException N/A N/A raised when a retired feature is used. N/A TemplateLookupException N/A MakoException N/A N/A N/A TopLevelLookupException N/A TemplateLookupException N/A N/A N/A RichTraceback N/A object N/A N/A Pulls the current exception from the sys traceback and extracts
    Mako-specific template information.
 
    See the usage examples in :ref:`handling_exceptions`.
 
     __init__ N/A N/A self error traceback N/A None None N/A N/A N/A N/A self source N/A self lineno N/A 0 N/A N/A N/A error None N/A traceback None N/A N/A N/A t value tback N/A N/A sys exc_info N/A N/A error None N/A N/A error N/A value t N/A N/A traceback None N/A N/A traceback tback N/A N/A self error error N/A N/A self records N/A N/A self _init traceback N/A N/A isinstance N/A self error N/A CompileException SyntaxException N/A N/A mako.template N/A N/A self source N/A N/A self error source N/A N/A self lineno N/A N/A self error lineno N/A N/A self _has_source True N/A N/A N/A self _init_message N/A errorname N/A N/A self N/A N/A N/A N/A N/A util exception_name N/A self error N/A property _init_message N/A N/A self N/A N/A N/A Find a unicode representation of self.error N/A N/A N/A N/A self message N/A str N/A self error N/A N/A N/A UnicodeError N/A N/A N/A N/A N/A self message N/A str N/A self error N/A N/A N/A UnicodeEncodeError N/A N/A N/A self message N/A N/A N/A self error args N/A 0 N/A N/A N/A isinstance N/A self message str N/A N/A N/A self message N/A str N/A self message ascii replace N/A _get_reformatted_records N/A N/A self records N/A N/A N/A rec records N/A N/A N/A N/A rec N/A 6 None N/A N/A N/A N/A N/A rec N/A 4 N/A rec N/A 5 N/A rec N/A 2 N/A rec N/A 6 N/A N/A N/A N/A tuple N/A rec N/A 0 4 N/A traceback N/A N/A self N/A N/A N/A return a list of 4-tuple traceback records (i.e. normal python
        format) with template-corresponding lines remapped to the originating
        template.
 
         N/A N/A list N/A N/A self _get_reformatted_records N/A self records N/A property reverse_records N/A N/A self N/A N/A N/A N/A reversed N/A self records N/A property reverse_traceback N/A N/A self N/A N/A N/A return the same data as traceback, except in reverse order.
         N/A N/A list N/A N/A self _get_reformatted_records N/A self reverse_records N/A property _init N/A N/A self trcback N/A N/A N/A format a traceback from sys.exc_info() into 7-item tuples,
        containing the regular four traceback tuple items, plus the original
        template filename, the line number adjusted relative to the template
        source, and code line from that line number of the template. N/A mako.template N/A mods N/A N/A rawrecords N/A N/A traceback extract_tb trcback N/A new_trcback N/A N/A N/A filename lineno function line rawrecords N/A N/A N/A line N/A N/A line N/A N/A N/A N/A line_map template_lines N/A mods N/A filename N/A N/A N/A KeyError N/A N/A N/A N/A info N/A N/A N/A mako template _get_module_info filename N/A module_source N/A info code N/A template_source N/A info source N/A template_filename N/A N/A info template_filename filename N/A N/A N/A KeyError N/A N/A N/A N/A util py3k N/A N/A N/A N/A fp N/A open filename rb N/A encoding N/A N/A util parse_encoding fp N/A N/A N/A fp close N/A N/A N/A IOError N/A N/A encoding None N/A encoding N/A N/A line N/A N/A line decode encoding N/A N/A line N/A N/A line decode ascii replace N/A N/A N/A new_trcback append N/A filename lineno function line None None None None N/A N/A template_ln module_ln 1 N/A line_map N/A N/A line N/A N/A module_source split N/A N/A match N/A N/A re match \s*# SOURCE LINE (\d+) line N/A match N/A N/A template_ln N/A int N/A N/A match group 1 N/A module_ln 1 N/A N/A line_map N/A module_ln template_ln N/A template_lines N/A line N/A line N/A N/A template_source split N/A N/A mods N/A filename N/A line_map template_lines N/A template_ln N/A line_map N/A lineno N/A N/A template_ln N/A len template_lines N/A N/A template_line N/A template_lines N/A N/A template_ln 1 N/A N/A template_line None N/A N/A N/A new_trcback append N/A filename lineno function line template_filename template_ln template_line template_source N/A N/A N/A self source N/A N/A l N/A range N/A N/A len new_trcback 1 0 -1 N/A N/A N/A N/A new_trcback N/A l N/A 5 N/A N/A N/A self source N/A N/A new_trcback N/A l N/A 7 N/A N/A self lineno N/A N/A new_trcback N/A l N/A 5 N/A N/A N/A new_trcback N/A N/A N/A N/A fp N/A open N/A N/A new_trcback N/A -1 N/A 0 rb N/A encoding N/A N/A util parse_encoding fp N/A N/A N/A fp seek 0 N/A N/A self source N/A N/A fp read N/A N/A N/A fp close N/A encoding N/A N/A N/A self source N/A N/A N/A self source decode encoding N/A N/A N/A IOError N/A N/A N/A self source N/A N/A self lineno N/A N/A new_trcback N/A -1 N/A 1 N/A new_trcback N/A N/A text_error_template N/A N/A lookup N/A None N/A N/A Provides a template that renders a stack trace in a similar format to
    the Python interpreter, substituting source template filenames, line
    numbers and code for that of the originating source template, as
    applicable.
 
     N/A mako.template N/A N/A N/A N/A mako template Template 
<%page args="error=None, traceback=None"/>
<%!
    from mako.exceptions import RichTraceback
%>\
<%
    tback = RichTraceback(error=error, traceback=traceback)
%>\
Traceback (most recent call last):
% for (filename, lineno, function, line) in tback.traceback:
  File "${filename}", line ${lineno}, in ${function or '?'}
    ${line | trim}
% endfor
${tback.errorname}: ${tback.message}
 N/A html_error_template N/A N/A N/A N/A N/A Provides a template that renders a stack trace in an HTML format,
    providing an excerpt of code as well as substituting source template
    filenames, line numbers and code for that of the originating source
    template, as applicable.

    The template's default encoding_errors value is 'htmlentityreplace'. the
    template has two options. With the full option disabled, only a section of
    an HTML document is returned. with the css option disabled, the default
    stylesheet won't be included.
 
     N/A mako.template N/A N/A N/A N/A mako template Template 
<%!
    from mako.exceptions import RichTraceback
%>
<%page args="full=True, css=True, error=None, traceback=None"/>
% if full:
<html>
<head>
    <title>Mako Runtime Error</title>
% endif
% if css:
    <style>
        body { font-family:verdana; margin:10px 30px 10px 30px;}
        .stacktrace { margin:5px 5px 5px 5px; }
        .highlight { padding:0px 10px 0px 10px; background-color:#9F9FDF; }
        .nonhighlight { padding:0px; background-color:#DFDFDF; }
        .sample { padding:10px; margin:10px 10px 10px 10px; font-family:monospace; }
        .sampleline { padding:0px 10px 0px 10px; }
        .sourceline { margin:5px 5px 10px 5px; font-family:monospace;}
        .location { font-size:80%; }
    </style>
% endif
% if full:
</head>
<body>
% endif

<h2>Error !</h2>
<%
    tback = RichTraceback(error=error, traceback=traceback)
    src = tback.source
    line = tback.lineno
    if src:
        lines = src.split('\n')
    else:
        lines = None
%>
<h3>${tback.errorname}: ${tback.message}</h3>

% if lines:
    <div class="sample">
    <div class="nonhighlight">
% for index in range(max(0, line-4),min(len(lines), line+5)):
    % if index + 1 == line:
<div class="highlight">${index + 1} ${lines[index] | h}</div>
    % else:
<div class="sampleline">${index + 1} ${lines[index] | h}</div>
    % endif
% endfor
    </div>
    </div>
% endif

<div class="stacktrace">
% for (filename, lineno, function, line) in tback.reverse_traceback:
    <div class="location">${filename}, line ${lineno}:</div>
    <div class="sourceline">${line | h}</div>
% endfor
</div>

% if full:
</body>
</html>
% endif
 output_encoding N/A N/A sys getdefaultencoding encoding_errors htmlentityreplace N/A