<commit_before><div class="yui-b content">
    <% combined_exc = '%s: %s' % (c.traceback.exception_type, c.traceback.exception_value) %>
    <h1>${h.link_to(combined_exc, url=url.current())}</h1>
    <div class="traceback_posted">\
        % if c.is_owner:
        <div class="traceback_delete">${h.link_to('Delete', id_='delete_traceback')}</div>
        % endif
        ${widgets.format_timestamp(c.traceback.created)} by
        <span class="traceback_author">${c.author.displayname if c.author else 'Anonymous'}</span>\
        </div>
    <div class="traceback">
        <% 
            sort = request.GET.get('sort')
            options = ['In Call Order', 'Reverse Call Order']
            if sort and sort not in options:
                sort = options[0]
        %>
        <div class="sort_order">${h.select('order', sort, options, id='sort_order',
            onchange="document.location='%s?sort=' + document.getElementById('sort_order').value" % url.current())}</div>
        <%
            if sort == options[1]:
                frames = c.traceback.frames[::-1]
            else:
                frames = c.traceback.frames
        %>
        % if sort == options[1]:
        <blockquote>${c.traceback.exception_type}: ${c.traceback.exception_value}</blockquote>
        % endif
        <ul>
        % for frame in frames:
        <li><h4>
            <cite>${frame['module']}</cite> : <em>${frame['line']}</em>, in \
<code>${frame['function']}</code></h4>
            ${highlight(frame['operation'], py_lexer, html_formatter) | n}\
        </li>
        % endfor
        </ul>
        % if sort == options[0]:
        <blockquote>${c.traceback.exception_type}: ${c.traceback.exception_value}</blockquote>
        % endif
        <div class="description">
            <h2>Description</h2>
            <p>${c.traceback.description if c.traceback.description else 'No Description Entered'}</p>
        </div>
        <div class="sysinfo">
            <div class="language"><span class="language">${c.traceback.language}</span>: <span class="version">${c.traceback.version}</span></div>
            <table id="traceback_libs">
                <tbody>
                    <%
                        libs = sorted(list(c.traceback.libraries), lambda x,y: cmp(x.name, y.name))
                    %>
                    % for lib in libs:
                    <tr><td>${lib.name}</td><td class="version">${lib.version}</td></tr>
                    % endfor
                </tbody>
            </table>
        </div>
    </div>
</div>
<%namespace name="widgets" file="/widgets.mako"/>
<%def name="title()">${parent.title()} - ${_('Traceback %s' % c.traceback.id)}</%def>\
<%def name="javascript()">
${parent.javascript()}
<script>
$(document).ready(function() {
    $('#delete_traceback').click(function() {
        var answer = window.confirm("Are you sure you want to delete this traceback?");
        if (answer) {
            $.ajax({
                data: {"_method":"DELETE"},
                type: "POST",
                url: location.pathname,
                success: function(data, textStatus) {
                    window.location = '/tracebacks';
                }
            });
        }
        return false;
    });
});
</script>
</%def>
<%inherit file="../layout.mako" />\
<%!
from datetime import datetime
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
py_lexer = PythonLexer()
html_formatter = HtmlFormatter()
%><commit_msg>Fix for not showing exception<commit_after><div class="yui-b content">
    <% combined_exc = '%s: %s' % (c.traceback.exception_type, c.traceback.exception_value) %>
    <h1>${h.link_to(combined_exc, url=url.current())}</h1>
    <div class="traceback_posted">\
        % if c.is_owner:
        <div class="traceback_delete">${h.link_to('Delete', id_='delete_traceback')}</div>
        % endif
        ${widgets.format_timestamp(c.traceback.created)} by
        <span class="traceback_author">${c.author.displayname if c.author else 'Anonymous'}</span>\
        </div>
    <div class="traceback">
        <% 
            sort = request.GET.get('sort')
            options = ['In Call Order', 'Reverse Call Order']
            if sort and sort not in options:
                sort = options[0]
        %>
        <div class="sort_order">${h.select('order', sort, options, id='sort_order',
            onchange="document.location='%s?sort=' + document.getElementById('sort_order').value" % url.current())}</div>
        <%
            if sort == options[1]:
                frames = c.traceback.frames[::-1]
            else:
                frames = c.traceback.frames
        %>
        % if sort == options[1]:
        <blockquote>${c.traceback.exception_type}: ${c.traceback.exception_value}</blockquote>
        % endif
        <ul>
        % for frame in frames:
        <li><h4>
            <cite>${frame['module']}</cite> : <em>${frame['line']}</em>, in \
<code>${frame['function']}</code></h4>
            ${highlight(frame['operation'], py_lexer, html_formatter) | n}\
        </li>
        % endfor
        </ul>
        % if not sort or sort == options[0]:
        <blockquote>${c.traceback.exception_type}: ${c.traceback.exception_value}</blockquote>
        % endif
        <div class="description">
            <h2>Description</h2>
            <p>${c.traceback.description if c.traceback.description else 'No Description Entered'}</p>
        </div>
        <div class="sysinfo">
            <div class="language"><span class="language">${c.traceback.language}</span>: <span class="version">${c.traceback.version}</span></div>
            <table id="traceback_libs">
                <tbody>
                    <%
                        libs = sorted(list(c.traceback.libraries), lambda x,y: cmp(x.name, y.name))
                    %>
                    % for lib in libs:
                    <tr><td>${lib.name}</td><td class="version">${lib.version}</td></tr>
                    % endfor
                </tbody>
            </table>
        </div>
    </div>
</div>
<%namespace name="widgets" file="/widgets.mako"/>
<%def name="title()">${parent.title()} - ${_('Traceback %s' % c.traceback.id)}</%def>\
<%def name="javascript()">
${parent.javascript()}
<script>
$(document).ready(function() {
    $('#delete_traceback').click(function() {
        var answer = window.confirm("Are you sure you want to delete this traceback?");
        if (answer) {
            $.ajax({
                data: {"_method":"DELETE"},
                type: "POST",
                url: location.pathname,
                success: function(data, textStatus) {
                    window.location = '/tracebacks';
                }
            });
        }
        return false;
    });
});
</script>
</%def>
<%inherit file="../layout.mako" />\
<%!
from datetime import datetime
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
py_lexer = PythonLexer()
html_formatter = HtmlFormatter()
%>
{'fraction_non_alphanumeric': 0.17269643866591294, 'fraction_numerical': 0.0031091011871113624, 'mean_word_length': 2.1621983914209117, 'pattern_counts': {'":': 2, '<': 137, '<?xml version=': 0, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6868321', 'n_tokens_mistral': 2159, 'n_tokens_neox': 2072, 'n_words': 399}