technical_500.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  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; word-break: break-word; }
  19. summary { cursor: pointer; }
  20. table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; }
  21. tbody td, tbody th { vertical-align:top; padding:2px 3px; }
  22. thead th {
  23. padding:1px 6px 1px 3px; background:#fefefe; text-align:left;
  24. font-weight:normal; font-size:11px; border:1px solid #ddd;
  25. }
  26. tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; }
  27. table.vars { margin:5px 10px 2px 40px; width: auto; }
  28. table.vars td, table.req td { font-family:monospace; }
  29. table td.code { width:100%; }
  30. table td.code pre { overflow:hidden; }
  31. table.source th { color:#666; }
  32. table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }
  33. ul.traceback { list-style-type:none; color: #222; }
  34. ul.traceback li.cause { word-break: break-word; }
  35. ul.traceback li.frame { padding-bottom:1em; color:#4f4f4f; }
  36. ul.traceback li.user { background-color:#e0e0e0; color:#000 }
  37. div.context { padding:10px 0; overflow:hidden; }
  38. div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; }
  39. div.context ol li { font-family:monospace; white-space:pre; color:#777; cursor:pointer; padding-left: 2px; }
  40. div.context ol li pre { display:inline; }
  41. div.context ol.context-line li { color:#464646; background-color:#dfdfdf; padding: 3px 2px; }
  42. div.context ol.context-line li span { position:absolute; right:32px; }
  43. .user div.context ol.context-line li { background-color:#bbb; color:#000; }
  44. .user div.context ol li { color:#666; }
  45. div.commands, summary.commands { margin-left: 40px; }
  46. div.commands a, summary.commands { color:#555; text-decoration:none; }
  47. .user div.commands a { color: black; }
  48. #summary { background: #ffc; }
  49. #summary h2 { font-weight: normal; color: #666; }
  50. #explanation { background:#eee; }
  51. #template, #template-not-exist { background:#f6f6f6; }
  52. #template-not-exist ul { margin: 0 0 10px 20px; }
  53. #template-not-exist .postmortem-section { margin-bottom: 3px; }
  54. #unicode-hint { background:#eee; }
  55. #traceback { background:#eee; }
  56. #requestinfo { background:#f6f6f6; padding-left:120px; }
  57. #summary table { border:none; background:transparent; }
  58. #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }
  59. #requestinfo h3 { margin-bottom:-1em; }
  60. .error { background: #ffc; }
  61. .specific { color:#cc3300; font-weight:bold; }
  62. h2 span.commands { font-size:.7em; font-weight:normal; }
  63. span.commands a:link {color:#5E5694;}
  64. pre.exception_value { font-family: sans-serif; color: #575757; font-size: 1.5em; margin: 10px 0 10px 0; }
  65. .append-bottom { margin-bottom: 10px; }
  66. .fname { user-select: all; }
  67. </style>
  68. {% if not is_email %}
  69. <script>
  70. function hideAll(elems) {
  71. for (var e = 0; e < elems.length; e++) {
  72. elems[e].style.display = 'none';
  73. }
  74. }
  75. window.onload = function() {
  76. hideAll(document.querySelectorAll('ol.pre-context'));
  77. hideAll(document.querySelectorAll('ol.post-context'));
  78. hideAll(document.querySelectorAll('div.pastebin'));
  79. }
  80. function toggle() {
  81. for (var i = 0; i < arguments.length; i++) {
  82. var e = document.getElementById(arguments[i]);
  83. if (e) {
  84. e.style.display = e.style.display == 'none' ? 'block': 'none';
  85. }
  86. }
  87. return false;
  88. }
  89. function switchPastebinFriendly(link) {
  90. s1 = "Switch to copy-and-paste view";
  91. s2 = "Switch back to interactive view";
  92. link.textContent = link.textContent.trim() == s1 ? s2: s1;
  93. toggle('browserTraceback', 'pastebinTraceback');
  94. return false;
  95. }
  96. </script>
  97. {% endif %}
  98. </head>
  99. <body>
  100. <div id="summary">
  101. <h1>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %}
  102. {% if request %} at {{ request.path_info }}{% endif %}</h1>
  103. <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% if exception_notes %}{{ exception_notes }}{% endif %}{% else %}No exception message supplied{% endif %}</pre>
  104. <table class="meta">
  105. {% if request %}
  106. <tr>
  107. <th>Request Method:</th>
  108. <td>{{ request.META.REQUEST_METHOD }}</td>
  109. </tr>
  110. <tr>
  111. <th>Request URL:</th>
  112. <td>{{ request_insecure_uri }}</td>
  113. </tr>
  114. {% endif %}
  115. <tr>
  116. <th>Django Version:</th>
  117. <td>{{ django_version_info }}</td>
  118. </tr>
  119. {% if exception_type %}
  120. <tr>
  121. <th>Exception Type:</th>
  122. <td>{{ exception_type }}</td>
  123. </tr>
  124. {% endif %}
  125. {% if exception_type and exception_value %}
  126. <tr>
  127. <th>Exception Value:</th>
  128. <td><pre>{{ exception_value|force_escape }}</pre></td>
  129. </tr>
  130. {% endif %}
  131. {% if lastframe %}
  132. <tr>
  133. <th>Exception Location:</th>
  134. <td><span class="fname">{{ lastframe.filename }}</span>, line {{ lastframe.lineno }}, in {{ lastframe.function }}</td>
  135. </tr>
  136. {% endif %}
  137. {% if raising_view_name %}
  138. <tr>
  139. <th>Raised during:</th>
  140. <td>{{ raising_view_name }}</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|force_escape }}</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{% if not is_email %} <span class="commands"><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 class="cause"><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. {% if frame.tb %}
  228. <code class="fname">{{ frame.filename }}</code>, line {{ frame.lineno }}, in {{ frame.function }}
  229. {% elif forloop.first %}
  230. None
  231. {% else %}
  232. Traceback: None
  233. {% endif %}
  234. {% if frame.context_line %}
  235. <div class="context" id="c{{ frame.id }}">
  236. {% if frame.pre_context and not is_email %}
  237. <ol start="{{ frame.pre_context_lineno }}" class="pre-context" id="pre{{ frame.id }}">
  238. {% for line in frame.pre_context %}
  239. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
  240. {% endfor %}
  241. </ol>
  242. {% endif %}
  243. <ol start="{{ frame.lineno }}" class="context-line">
  244. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ frame.context_line }}{{ frame.colno }}</pre>{% if not is_email %} <span>…</span>{% endif %}</li>
  245. </ol>
  246. {% if frame.post_context and not is_email %}
  247. <ol start='{{ frame.lineno|add:"1" }}' class="post-context" id="post{{ frame.id }}">
  248. {% for line in frame.post_context %}
  249. <li onclick="toggle('pre{{ frame.id }}', 'post{{ frame.id }}')"><pre>{{ line }}</pre></li>
  250. {% endfor %}
  251. </ol>
  252. {% endif %}
  253. </div>
  254. {% endif %}
  255. {% if frame.vars %}
  256. {% if is_email %}
  257. <div class="commands">
  258. <h2>Local Vars</h2>
  259. </div>
  260. {% else %}
  261. <details>
  262. <summary class="commands">Local vars</summary>
  263. {% endif %}
  264. <table class="vars" id="v{{ frame.id }}">
  265. <thead>
  266. <tr>
  267. <th>Variable</th>
  268. <th>Value</th>
  269. </tr>
  270. </thead>
  271. <tbody>
  272. {% for var in frame.vars|dictsort:0 %}
  273. <tr>
  274. <td>{{ var.0 }}</td>
  275. <td class="code"><pre>{{ var.1 }}</pre></td>
  276. </tr>
  277. {% endfor %}
  278. </tbody>
  279. </table>
  280. {% if not is_email %}</details>{% endif %}
  281. {% endif %}
  282. </li>
  283. {% endfor %}
  284. </ul>
  285. </div>
  286. {% if not is_email %}
  287. <form action="https://dpaste.com/" name="pasteform" id="pasteform" method="post">
  288. <div id="pastebinTraceback" class="pastebin">
  289. <input type="hidden" name="language" value="PythonConsole">
  290. <input type="hidden" name="title"
  291. value="{{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}">
  292. <input type="hidden" name="source" value="Django Dpaste Agent">
  293. <input type="hidden" name="poster" value="Django">
  294. <textarea name="content" id="traceback_area" cols="140" rows="25">
  295. Environment:
  296. {% if request %}
  297. Request Method: {{ request.META.REQUEST_METHOD }}
  298. Request URL: {{ request_insecure_uri }}
  299. {% endif %}
  300. Django Version: {{ django_version_info }}
  301. Python Version: {{ sys_version_info }}
  302. Installed Applications:
  303. {{ settings.INSTALLED_APPS|pprint }}
  304. Installed Middleware:
  305. {{ settings.MIDDLEWARE|pprint }}
  306. {% if template_does_not_exist %}Template loader postmortem
  307. {% if postmortem %}Django tried loading these templates, in this order:
  308. {% for entry in postmortem %}
  309. Using engine {{ entry.backend.name }}:
  310. {% if entry.tried %}{% for attempt in entry.tried %} * {{ attempt.0.loader_name }}: {{ attempt.0.name }} ({{ attempt.1 }})
  311. {% endfor %}{% else %} This engine did not provide a list of tried templates.
  312. {% endif %}{% endfor %}
  313. {% else %}No templates were found because your 'TEMPLATES' setting is not configured.
  314. {% endif %}{% endif %}{% if template_info %}
  315. Template error:
  316. In template {{ template_info.name }}, error at line {{ template_info.line }}
  317. {{ template_info.message|force_escape }}
  318. {% 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 %}
  319. Traceback (most recent call last):{% for frame in frames %}
  320. {% ifchanged frame.exc_cause %}{% if frame.exc_cause %}{% if frame.exc_cause_explicit %}
  321. The above exception ({{ frame.exc_cause|force_escape }}) was the direct cause of the following exception:
  322. {% else %}
  323. During handling of the above exception ({{ frame.exc_cause|force_escape }}), another exception occurred:
  324. {% endif %}{% endif %}{% endifchanged %} {% if frame.tb %}File "{{ frame.filename }}"{% if frame.context_line %}, line {{ frame.lineno }}{% endif %}, in {{ frame.function }}
  325. {% if frame.context_line %} {% spaceless %}{{ frame.context_line }}{% endspaceless %}{{ frame.tb_area_colno }}{% endif %}{% elif forloop.first %}None{% else %}Traceback: None{% endif %}{% endfor %}
  326. Exception Type: {{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}
  327. Exception Value: {{ exception_value|force_escape }}{% if exception_notes %}{{ exception_notes }}{% endif %}
  328. </textarea>
  329. <br><br>
  330. <input type="submit" value="Share this traceback on a public website">
  331. </div>
  332. </form>
  333. {% endif %}
  334. </div>
  335. {% endif %}
  336. <div id="requestinfo">
  337. <h2>Request information</h2>
  338. {% if request %}
  339. {% if user_str %}
  340. <h3 id="user-info">USER</h3>
  341. <p>{{ user_str }}</p>
  342. {% endif %}
  343. <h3 id="get-info">GET</h3>
  344. {% if request.GET %}
  345. <table class="req">
  346. <thead>
  347. <tr>
  348. <th>Variable</th>
  349. <th>Value</th>
  350. </tr>
  351. </thead>
  352. <tbody>
  353. {% for k, v in request_GET_items %}
  354. <tr>
  355. <td>{{ k }}</td>
  356. <td class="code"><pre>{{ v|pprint }}</pre></td>
  357. </tr>
  358. {% endfor %}
  359. </tbody>
  360. </table>
  361. {% else %}
  362. <p>No GET data</p>
  363. {% endif %}
  364. <h3 id="post-info">POST</h3>
  365. {% if filtered_POST_items %}
  366. <table class="req">
  367. <thead>
  368. <tr>
  369. <th>Variable</th>
  370. <th>Value</th>
  371. </tr>
  372. </thead>
  373. <tbody>
  374. {% for k, v in filtered_POST_items %}
  375. <tr>
  376. <td>{{ k }}</td>
  377. <td class="code"><pre>{{ v|pprint }}</pre></td>
  378. </tr>
  379. {% endfor %}
  380. </tbody>
  381. </table>
  382. {% else %}
  383. <p>No POST data</p>
  384. {% endif %}
  385. <h3 id="files-info">FILES</h3>
  386. {% if request.FILES %}
  387. <table class="req">
  388. <thead>
  389. <tr>
  390. <th>Variable</th>
  391. <th>Value</th>
  392. </tr>
  393. </thead>
  394. <tbody>
  395. {% for k, v in request_FILES_items %}
  396. <tr>
  397. <td>{{ k }}</td>
  398. <td class="code"><pre>{{ v|pprint }}</pre></td>
  399. </tr>
  400. {% endfor %}
  401. </tbody>
  402. </table>
  403. {% else %}
  404. <p>No FILES data</p>
  405. {% endif %}
  406. <h3 id="cookie-info">COOKIES</h3>
  407. {% if request.COOKIES %}
  408. <table class="req">
  409. <thead>
  410. <tr>
  411. <th>Variable</th>
  412. <th>Value</th>
  413. </tr>
  414. </thead>
  415. <tbody>
  416. {% for k, v in request_COOKIES_items %}
  417. <tr>
  418. <td>{{ k }}</td>
  419. <td class="code"><pre>{{ v|pprint }}</pre></td>
  420. </tr>
  421. {% endfor %}
  422. </tbody>
  423. </table>
  424. {% else %}
  425. <p>No cookie data</p>
  426. {% endif %}
  427. <h3 id="meta-info">META</h3>
  428. <table class="req">
  429. <thead>
  430. <tr>
  431. <th>Variable</th>
  432. <th>Value</th>
  433. </tr>
  434. </thead>
  435. <tbody>
  436. {% for k, v in request_meta.items|dictsort:0 %}
  437. <tr>
  438. <td>{{ k }}</td>
  439. <td class="code"><pre>{{ v|pprint }}</pre></td>
  440. </tr>
  441. {% endfor %}
  442. </tbody>
  443. </table>
  444. {% else %}
  445. <p>Request data not supplied</p>
  446. {% endif %}
  447. <h3 id="settings-info">Settings</h3>
  448. <h4>Using settings module <code>{{ settings.SETTINGS_MODULE }}</code></h4>
  449. <table class="req">
  450. <thead>
  451. <tr>
  452. <th>Setting</th>
  453. <th>Value</th>
  454. </tr>
  455. </thead>
  456. <tbody>
  457. {% for k, v in settings.items|dictsort:0 %}
  458. <tr>
  459. <td>{{ k }}</td>
  460. <td class="code"><pre>{{ v|pprint }}</pre></td>
  461. </tr>
  462. {% endfor %}
  463. </tbody>
  464. </table>
  465. </div>
  466. {% if not is_email %}
  467. <div id="explanation">
  468. <p>
  469. You’re seeing this error because you have <code>DEBUG = True</code> in your
  470. Django settings file. Change that to <code>False</code>, and Django will
  471. display a standard page generated by the handler for this status code.
  472. </p>
  473. </div>
  474. {% endif %}
  475. </body>
  476. </html>