technical_500.html 17 KB

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