You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

technical_500.html 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=utf-8">
  5. <meta name="robots" content="NONE,NOARCHIVE">
  6. <title>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}
  7. {% if request %} at {{ request.path_info }}{% endif %}</title>
  8. <style type="text/css">
  9. html * { padding:0; margin:0; }
  10. body * { padding:10px 20px; }
  11. body * * { padding:0; }
  12. body { font:small sans-serif; background-color:#fff; color:#000; }
  13. body>div { border-bottom:1px solid #ddd; }
  14. h1 { font-weight:normal; }
  15. h2 { margin-bottom:.8em; }
  16. h3 { margin:1em 0 .5em 0; }
  17. h4 { margin:0 0 .5em 0; font-weight: normal; }
  18. code, pre { font-size: 100%; white-space: pre-wrap; }
  19. table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; }
  20. tbody td, tbody th { vertical-align:top; padding:2px 3px; }
  21. thead th {
  22. padding:1px 6px 1px 3px; background:#fefefe; text-align:left;
  23. font-weight:normal; font-size:11px; border:1px solid #ddd;
  24. }
  25. tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; }
  26. table.vars { margin:5px 0 2px 40px; }
  27. table.vars td, table.req td { font-family:monospace; }
  28. table td.code { width:100%; }
  29. table td.code pre { overflow:hidden; }
  30. table.source th { color:#666; }
  31. table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
  32. ul.traceback { list-style-type:none; color: #222; }
  33. ul.traceback li.frame { padding-bottom:1em; color:#4f4f4f; }
  34. ul.traceback li.user { background-color:#e0e0e0; color:#000 }
  35. div.context { padding:10px 0; overflow:hidden; }
  36. div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; }
  37. div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; padding-left: 2px; }
  38. div.context ol li pre { display:inline; }
  39. div.context ol.context-line li { color:#464646; background-color:#dfdfdf; padding: 3px 2px; }
  40. div.context ol.context-line li span { position:absolute; right:32px; }
  41. .user div.context ol.context-line li { background-color:#bbb; color:#000; }
  42. .user div.context ol li { color:#666; }
  43. div.commands { margin-left: 40px; }
  44. div.commands a { color:#555; text-decoration:none; }
  45. .user div.commands a { color: black; }
  46. #summary { background: #ffc; }
  47. #summary h2 { font-weight: normal; color: #666; }
  48. #explanation { background:#eee; }
  49. #template, #template-not-exist { background:#f6f6f6; }
  50. #template-not-exist ul { margin: 0 0 10px 20px; }
  51. #template-not-exist .postmortem-section { margin-bottom: 3px; }
  52. #unicode-hint { background:#eee; }
  53. #traceback { background:#eee; }
  54. #requestinfo { background:#f6f6f6; padding-left:120px; }
  55. #summary table { border:none; background:transparent; }
  56. #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
  57. #requestinfo h3 { margin-bottom:-1em; }
  58. .error { background: #ffc; }
  59. .specific { color:#cc3300; font-weight:bold; }
  60. h2 span.commands { font-size:.7em; font-weight:normal; }
  61. span.commands a:link {color:#5E5694;}
  62. pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5em; margin: 10px 0 10px 0; }
  63. .append-bottom { margin-bottom: 10px; }
  64. </style>
  65. {% if not is_email %}
  66. <script type="text/javascript">
  67. function hideAll(elems) {
  68. for (var e = 0; e < elems.length; e++) {
  69. elems[e].style.display = 'none';
  70. }
  71. }
  72. window.onload = function() {
  73. hideAll(document.querySelectorAll('table.vars'));
  74. hideAll(document.querySelectorAll('ol.pre-context'));
  75. hideAll(document.querySelectorAll('ol.post-context'));
  76. hideAll(document.querySelectorAll('div.pastebin'));
  77. }
  78. function toggle() {
  79. for (var i = 0; i < arguments.length; i++) {
  80. var e = document.getElementById(arguments[i]);
  81. if (e) {
  82. e.style.display = e.style.display == 'none' ? 'block': 'none';
  83. }
  84. }
  85. return false;
  86. }
  87. function varToggle(link, id) {
  88. toggle('v' + id);
  89. var s = link.getElementsByTagName('span')[0];
  90. var uarr = String.fromCharCode(0x25b6);
  91. var darr = String.fromCharCode(0x25bc);
  92. s.textContent = s.textContent == uarr ? darr : uarr;
  93. return false;
  94. }
  95. function switchPastebinFriendly(link) {
  96. s1 = "Switch to copy-and-paste view";
  97. s2 = "Switch back to interactive view";
  98. link.textContent = link.textContent.trim() == s1 ? s2: s1;
  99. toggle('browserTraceback', 'pastebinTraceback');
  100. return false;
  101. }
  102. </script>
  103. {% endif %}
  104. </head>
  105. <body>
  106. <div id="summary">
  107. <h1>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}
  108. {% if request %} at {{ request.path_info }}{% endif %}</h1>
  109. <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception message supplied{% endif %}</pre>
  110. <table class="meta">
  111. {% if request %}
  112. <tr>
  113. <th>Request Method:</th>
  114. <td>{{ request.META.REQUEST_METHOD }}</td>
  115. </tr>
  116. <tr>
  117. <th>Request URL:</th>
  118. <td>{{ request.get_raw_uri }}</td>
  119. </tr>
  120. {% endif %}
  121. <tr>
  122. <th>Django Version:</th>
  123. <td>{{ django_version_info }}</td>
  124. </tr>
  125. {% if exception_type %}
  126. <tr>
  127. <th>Exception Type:</th>
  128. <td>{{ exception_type }}</td>
  129. </tr>
  130. {% endif %}
  131. {% if exception_type and exception_value %}
  132. <tr>
  133. <th>Exception Value:</th>
  134. <td><pre>{{ exception_value|force_escape }}</pre></td>
  135. </tr>
  136. {% endif %}
  137. {% if lastframe %}
  138. <tr>
  139. <th>Exception Location:</th>
  140. <td>{{ lastframe.filename }} in {{ lastframe.function }}, line {{ lastframe.lineno }}</td>
  141. </tr>
  142. {% endif %}
  143. <tr>
  144. <th>Python Executable:</th>
  145. <td>{{ sys_executable }}</td>
  146. </tr>
  147. <tr>
  148. <th>Python Version:</th>
  149. <td>{{ sys_version_info }}</td>
  150. </tr>
  151. <tr>
  152. <th>Python Path:</th>
  153. <td><pre>{{ sys_path|pprint }}</pre></td>
  154. </tr>
  155. <tr>
  156. <th>Server time:</th>
  157. <td>{{server_time|date:"r"}}</td>
  158. </tr>
  159. </table>
  160. </div>
  161. {% if unicode_hint %}
  162. <div id="unicode-hint">
  163. <h2>Unicode error hint</h2>
  164. <p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint }}</strong></p>
  165. </div>
  166. {% endif %}
  167. {% if template_does_not_exist %}
  168. <div id="template-not-exist">
  169. <h2>Template-loader postmortem</h2>
  170. {% if postmortem %}
  171. <p class="append-bottom">Django tried loading these templates, in this order:</p>
  172. {% for entry in postmortem %}
  173. <p class="postmortem-section">Using engine <code>{{ entry.backend.name }}</code>:</p>
  174. <ul>
  175. {% if entry.tried %}
  176. {% for attempt in entry.tried %}
  177. <li><code>{{ attempt.0.loader_name }}</code>: {{ attempt.0.name }} ({{ attempt.1 }})</li>
  178. {% endfor %}
  179. {% else %}
  180. <li>This engine did not provide a list of tried templates.</li>
  181. {% endif %}
  182. </ul>
  183. {% endfor %}
  184. {% else %}
  185. <p>No templates were found because your 'TEMPLATES' setting is not configured.</p>
  186. {% endif %}
  187. </div>
  188. {% endif %}
  189. {% if template_info %}
  190. <div id="template">
  191. <h2>Error during template rendering</h2>
  192. <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p>
  193. <h3>{{ template_info.message }}</h3>
  194. <table class="source{% if template_info.top %} cut-top{% endif %}
  195. {% if template_info.bottom != template_info.total %} cut-bottom{% endif %}">
  196. {% for source_line in template_info.source_lines %}
  197. {% if source_line.0 == template_info.line %}
  198. <tr class="error"><th>{{ source_line.0 }}</th>
  199. <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td>
  200. </tr>
  201. {% else %}
  202. <tr><th>{{ source_line.0 }}</th>
  203. <td>{{ source_line.1 }}</td></tr>
  204. {% endif %}
  205. {% endfor %}
  206. </table>
  207. </div>
  208. {% endif %}
  209. {% if frames %}
  210. <div id="traceback">
  211. <h2>Traceback <span class="commands">{% if not is_email %}<a href="#" onclick="return switchPastebinFriendly(this);">
  212. Switch to copy-and-paste view</a></span>{% endif %}
  213. </h2>
  214. <div id="browserTraceback">
  215. <ul class="traceback">
  216. {% for frame in frames %}
  217. {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}
  218. <li><h3>
  219. {% if frame.exc_cause_explicit %}
  220. The above exception ({{ frame.exc_cause|force_escape }}) was the direct cause of the following exception:
  221. {% else %}
  222. During handling of the above exception ({{ frame.exc_cause|force_escape }}), another exception occurred:
  223. {% endif %}
  224. </h3></li>
  225. {% endif %}{% endifchanged %}
  226. <li class="frame {{ frame.type }}">
  227. <code>{{ frame.filename }}</code> in <code>{{ frame.function }}</code>
  228. {% if frame.context_line %}
  229. <div class="context" id="c{{ frame.id }}">
  230. {% if frame.pre_context and not is_email %}
  231. <ol start="{{ frame.pre_context_lineno }}" class="pre-context" id="pre{{ frame.id }}">
  232. {% for line in frame.pre_context %}
  233. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
  234. {% endfor %}
  235. </ol>
  236. {% endif %}
  237. <ol start="{{ frame.lineno }}" class="context-line">
  238. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ frame.context_line }}</pre>{% if not is_email %} <span>…</span>{% endif %}</li>
  239. </ol>
  240. {% if frame.post_context and not is_email %}
  241. <ol start='{{ frame.lineno|add:"1" }}' class="post-context" id="post{{ frame.id }}">
  242. {% for line in frame.post_context %}
  243. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
  244. {% endfor %}
  245. </ol>
  246. {% endif %}
  247. </div>
  248. {% endif %}
  249. {% if frame.vars %}
  250. <div class="commands">
  251. {% if is_email %}
  252. <h2>Local Vars</h2>
  253. {% else %}
  254. <a href="#" onclick="return varToggle(this, '{{ frame.id }}')"><span>&#x25b6;</span> Local vars</a>
  255. {% endif %}
  256. </div>
  257. <table class="vars" id="v{{ frame.id }}">
  258. <thead>
  259. <tr>
  260. <th>Variable</th>
  261. <th>Value</th>
  262. </tr>
  263. </thead>
  264. <tbody>
  265. {% for var in frame.vars|dictsort:0 %}
  266. <tr>
  267. <td>{{ var.0 }}</td>
  268. <td class="code"><pre>{{ var.1 }}</pre></td>
  269. </tr>
  270. {% endfor %}
  271. </tbody>
  272. </table>
  273. {% endif %}
  274. </li>
  275. {% endfor %}
  276. </ul>
  277. </div>
  278. <form action="http://dpaste.com/" name="pasteform" id="pasteform" method="post">
  279. {% if not is_email %}
  280. <div id="pastebinTraceback" class="pastebin">
  281. <input type="hidden" name="language" value="PythonConsole">
  282. <input type="hidden" name="title"
  283. value="{{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}">
  284. <input type="hidden" name="source" value="Django Dpaste Agent">
  285. <input type="hidden" name="poster" value="Django">
  286. <textarea name="content" id="traceback_area" cols="140" rows="25">
  287. Environment:
  288. {% if request %}
  289. Request Method: {{ request.META.REQUEST_METHOD }}
  290. Request URL: {{ request.get_raw_uri }}
  291. {% endif %}
  292. Django Version: {{ django_version_info }}
  293. Python Version: {{ sys_version_info }}
  294. Installed Applications:
  295. {{ settings.INSTALLED_APPS|pprint }}
  296. Installed Middleware:
  297. {{ settings.MIDDLEWARE|pprint }}
  298. {% if template_does_not_exist %}Template loader postmortem
  299. {% if postmortem %}Django tried loading these templates, in this order:
  300. {% for entry in postmortem %}
  301. Using engine {{ entry.backend.name }}:
  302. {% if entry.tried %}{% for attempt in entry.tried %} * {{ attempt.0.loader_name }}: {{ attempt.0.name }} ({{ attempt.1 }})
  303. {% endfor %}{% else %} This engine did not provide a list of tried templates.
  304. {% endif %}{% endfor %}
  305. {% else %}No templates were found because your 'TEMPLATES' setting is not configured.
  306. {% endif %}{% endif %}{% if template_info %}
  307. Template error:
  308. In template {{ template_info.name }}, error at line {{ template_info.line }}
  309. {{ template_info.message }}
  310. {% for source_line in template_info.source_lines %}{% if source_line.0 == template_info.line %} {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }}{% else %} {{ source_line.0 }} : {{ source_line.1 }}{% endif %}{% endfor %}{% endif %}
  311. Traceback:{% for frame in frames %}
  312. {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}{% if frame.exc_cause_explicit %}
  313. The above exception ({{ frame.exc_cause|force_escape }}) was the direct cause of the following exception:
  314. {% else %}
  315. During handling of the above exception ({{ frame.exc_cause|force_escape }}), another exception occurred:
  316. {% endif %}{% endif %}{% endifchanged %}
  317. File "{{ frame.filename }}" in {{ frame.function }}
  318. {% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line }}{% endif %}{% endfor %}
  319. Exception Type: {{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}
  320. Exception Value: {{ exception_value|force_escape }}
  321. </textarea>
  322. <br><br>
  323. <input type="submit" value="Share this traceback on a public website">
  324. </div>
  325. </form>
  326. </div>
  327. {% endif %}
  328. {% endif %}
  329. <div id="requestinfo">
  330. <h2>Request information</h2>
  331. {% if request %}
  332. {% if user_str %}
  333. <h3 id="user-info">USER</h3>
  334. <p>{{ user_str }}</p>
  335. {% endif %}
  336. <h3 id="get-info">GET</h3>
  337. {% if request.GET %}
  338. <table class="req">
  339. <thead>
  340. <tr>
  341. <th>Variable</th>
  342. <th>Value</th>
  343. </tr>
  344. </thead>
  345. <tbody>
  346. {% for k, v in request_GET_items %}
  347. <tr>
  348. <td>{{ k }}</td>
  349. <td class="code"><pre>{{ v|pprint }}</pre></td>
  350. </tr>
  351. {% endfor %}
  352. </tbody>
  353. </table>
  354. {% else %}
  355. <p>No GET data</p>
  356. {% endif %}
  357. <h3 id="post-info">POST</h3>
  358. {% if filtered_POST_items %}
  359. <table class="req">
  360. <thead>
  361. <tr>
  362. <th>Variable</th>
  363. <th>Value</th>
  364. </tr>
  365. </thead>
  366. <tbody>
  367. {% for k, v in filtered_POST_items %}
  368. <tr>
  369. <td>{{ k }}</td>
  370. <td class="code"><pre>{{ v|pprint }}</pre></td>
  371. </tr>
  372. {% endfor %}
  373. </tbody>
  374. </table>
  375. {% else %}
  376. <p>No POST data</p>
  377. {% endif %}
  378. <h3 id="files-info">FILES</h3>
  379. {% if request.FILES %}
  380. <table class="req">
  381. <thead>
  382. <tr>
  383. <th>Variable</th>
  384. <th>Value</th>
  385. </tr>
  386. </thead>
  387. <tbody>
  388. {% for k, v in request_FILES_items %}
  389. <tr>
  390. <td>{{ k }}</td>
  391. <td class="code"><pre>{{ v|pprint }}</pre></td>
  392. </tr>
  393. {% endfor %}
  394. </tbody>
  395. </table>
  396. {% else %}
  397. <p>No FILES data</p>
  398. {% endif %}
  399. <h3 id="cookie-info">COOKIES</h3>
  400. {% if request.COOKIES %}
  401. <table class="req">
  402. <thead>
  403. <tr>
  404. <th>Variable</th>
  405. <th>Value</th>
  406. </tr>
  407. </thead>
  408. <tbody>
  409. {% for k, v in request_COOKIES_items %}
  410. <tr>
  411. <td>{{ k }}</td>
  412. <td class="code"><pre>{{ v|pprint }}</pre></td>
  413. </tr>
  414. {% endfor %}
  415. </tbody>
  416. </table>
  417. {% else %}
  418. <p>No cookie data</p>
  419. {% endif %}
  420. <h3 id="meta-info">META</h3>
  421. <table class="req">
  422. <thead>
  423. <tr>
  424. <th>Variable</th>
  425. <th>Value</th>
  426. </tr>
  427. </thead>
  428. <tbody>
  429. {% for var in request.META.items|dictsort:0 %}
  430. <tr>
  431. <td>{{ var.0 }}</td>
  432. <td class="code"><pre>{{ var.1|pprint }}</pre></td>
  433. </tr>
  434. {% endfor %}
  435. </tbody>
  436. </table>
  437. {% else %}
  438. <p>Request data not supplied</p>
  439. {% endif %}
  440. <h3 id="settings-info">Settings</h3>
  441. <h4>Using settings module <code>{{ settings.SETTINGS_MODULE }}</code></h4>
  442. <table class="req">
  443. <thead>
  444. <tr>
  445. <th>Setting</th>
  446. <th>Value</th>
  447. </tr>
  448. </thead>
  449. <tbody>
  450. {% for var in settings.items|dictsort:0 %}
  451. <tr>
  452. <td>{{ var.0 }}</td>
  453. <td class="code"><pre>{{ var.1|pprint }}</pre></td>
  454. </tr>
  455. {% endfor %}
  456. </tbody>
  457. </table>
  458. </div>
  459. {% if not is_email %}
  460. <div id="explanation">
  461. <p>
  462. You're seeing this error because you have <code>DEBUG = True</code> in your
  463. Django settings file. Change that to <code>False</code>, and Django will
  464. display a standard page generated by the handler for this status code.
  465. </p>
  466. </div>
  467. {% endif %}
  468. </body>
  469. </html>