technical_500.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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 (most recent call last):{% 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 %} File "{{ frame.filename }}"{% if frame.context_line %}, line {{ frame.lineno }}{% endif %}, in {{ frame.function }}
  317. {% if frame.context_line %} {% spaceless %}{{ frame.context_line }}{% endspaceless %}{% endif %}{% endfor %}
  318. Exception Type: {{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}
  319. Exception Value: {{ exception_value|force_escape }}
  320. </textarea>
  321. <br><br>
  322. <input type="submit" value="Share this traceback on a public website">
  323. </div>
  324. </form>
  325. </div>
  326. {% endif %}
  327. {% endif %}
  328. <div id="requestinfo">
  329. <h2>Request information</h2>
  330. {% if request %}
  331. {% if user_str %}
  332. <h3 id="user-info">USER</h3>
  333. <p>{{ user_str }}</p>
  334. {% endif %}
  335. <h3 id="get-info">GET</h3>
  336. {% if request.GET %}
  337. <table class="req">
  338. <thead>
  339. <tr>
  340. <th>Variable</th>
  341. <th>Value</th>
  342. </tr>
  343. </thead>
  344. <tbody>
  345. {% for k, v in request_GET_items %}
  346. <tr>
  347. <td>{{ k }}</td>
  348. <td class="code"><pre>{{ v|pprint }}</pre></td>
  349. </tr>
  350. {% endfor %}
  351. </tbody>
  352. </table>
  353. {% else %}
  354. <p>No GET data</p>
  355. {% endif %}
  356. <h3 id="post-info">POST</h3>
  357. {% if filtered_POST_items %}
  358. <table class="req">
  359. <thead>
  360. <tr>
  361. <th>Variable</th>
  362. <th>Value</th>
  363. </tr>
  364. </thead>
  365. <tbody>
  366. {% for k, v in filtered_POST_items %}
  367. <tr>
  368. <td>{{ k }}</td>
  369. <td class="code"><pre>{{ v|pprint }}</pre></td>
  370. </tr>
  371. {% endfor %}
  372. </tbody>
  373. </table>
  374. {% else %}
  375. <p>No POST data</p>
  376. {% endif %}
  377. <h3 id="files-info">FILES</h3>
  378. {% if request.FILES %}
  379. <table class="req">
  380. <thead>
  381. <tr>
  382. <th>Variable</th>
  383. <th>Value</th>
  384. </tr>
  385. </thead>
  386. <tbody>
  387. {% for k, v in request_FILES_items %}
  388. <tr>
  389. <td>{{ k }}</td>
  390. <td class="code"><pre>{{ v|pprint }}</pre></td>
  391. </tr>
  392. {% endfor %}
  393. </tbody>
  394. </table>
  395. {% else %}
  396. <p>No FILES data</p>
  397. {% endif %}
  398. <h3 id="cookie-info">COOKIES</h3>
  399. {% if request.COOKIES %}
  400. <table class="req">
  401. <thead>
  402. <tr>
  403. <th>Variable</th>
  404. <th>Value</th>
  405. </tr>
  406. </thead>
  407. <tbody>
  408. {% for k, v in request_COOKIES_items %}
  409. <tr>
  410. <td>{{ k }}</td>
  411. <td class="code"><pre>{{ v|pprint }}</pre></td>
  412. </tr>
  413. {% endfor %}
  414. </tbody>
  415. </table>
  416. {% else %}
  417. <p>No cookie data</p>
  418. {% endif %}
  419. <h3 id="meta-info">META</h3>
  420. <table class="req">
  421. <thead>
  422. <tr>
  423. <th>Variable</th>
  424. <th>Value</th>
  425. </tr>
  426. </thead>
  427. <tbody>
  428. {% for var in request.META.items|dictsort:0 %}
  429. <tr>
  430. <td>{{ var.0 }}</td>
  431. <td class="code"><pre>{{ var.1|pprint }}</pre></td>
  432. </tr>
  433. {% endfor %}
  434. </tbody>
  435. </table>
  436. {% else %}
  437. <p>Request data not supplied</p>
  438. {% endif %}
  439. <h3 id="settings-info">Settings</h3>
  440. <h4>Using settings module <code>{{ settings.SETTINGS_MODULE }}</code></h4>
  441. <table class="req">
  442. <thead>
  443. <tr>
  444. <th>Setting</th>
  445. <th>Value</th>
  446. </tr>
  447. </thead>
  448. <tbody>
  449. {% for var in settings.items|dictsort:0 %}
  450. <tr>
  451. <td>{{ var.0 }}</td>
  452. <td class="code"><pre>{{ var.1|pprint }}</pre></td>
  453. </tr>
  454. {% endfor %}
  455. </tbody>
  456. </table>
  457. </div>
  458. {% if not is_email %}
  459. <div id="explanation">
  460. <p>
  461. You're seeing this error because you have <code>DEBUG = True</code> in your
  462. Django settings file. Change that to <code>False</code>, and Django will
  463. display a standard page generated by the handler for this status code.
  464. </p>
  465. </div>
  466. {% endif %}
  467. </body>
  468. </html>