django_template_error.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. {
  2. "level": "error",
  3. "exception": {
  4. "values": [
  5. {
  6. "module": "django.urls.exceptions",
  7. "type": "NoReverseMatch",
  8. "value": "Reverse for 'nope' not found. 'nope' is not a valid view function or pattern name.",
  9. "mechanism": {
  10. "type": "django",
  11. "handled": false
  12. },
  13. "stacktrace": {
  14. "frames": [
  15. {
  16. "filename": "django/core/handlers/exception.py",
  17. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
  18. "function": "inner",
  19. "module": "django.core.handlers.exception",
  20. "lineno": 34,
  21. "pre_context": [
  22. " can rely on getting a response instead of an exception.",
  23. " \"\"\"",
  24. " @wraps(get_response)",
  25. " def inner(request):",
  26. " try:"
  27. ],
  28. "context_line": " response = get_response(request)",
  29. "post_context": [
  30. " except Exception as exc:",
  31. " response = response_for_exception(request, exc)",
  32. " return response",
  33. " return inner",
  34. ""
  35. ],
  36. "vars": {
  37. "request": "<WSGIRequest: GET '/template-error/'>",
  38. "exc": "NoReverseMatch(\"Reverse for 'nope' not found. 'nope' is not a valid view function or pattern name.\")",
  39. "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fc14cb6efa0>>"
  40. }
  41. },
  42. {
  43. "filename": "django/core/handlers/base.py",
  44. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  45. "function": "_get_response",
  46. "module": "django.core.handlers.base",
  47. "lineno": 145,
  48. "pre_context": [
  49. " )",
  50. "",
  51. " try:",
  52. " response = response.render()",
  53. " except Exception as e:"
  54. ],
  55. "context_line": " response = self.process_exception_by_middleware(e, request)",
  56. "post_context": [
  57. "",
  58. " return response",
  59. "",
  60. " def process_exception_by_middleware(self, exception, request):",
  61. " \"\"\""
  62. ],
  63. "vars": {
  64. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7fc14cb6efa0>",
  65. "request": "<WSGIRequest: GET '/template-error/'>",
  66. "response": "<TemplateResponse status_code=200, \"text/html; charset=utf-8\">",
  67. "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  68. "resolver_match": "ResolverMatch(func=errors.views.TemplateErrorView, args=(), kwargs={}, url_name=template_error, app_names=[], namespaces=[], route=template-error/)",
  69. "callback": "<function TemplateErrorView at 0x7fc14c63f940>",
  70. "callback_args": [],
  71. "callback_kwargs": {},
  72. "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7fc14bc8ce50>",
  73. "wrapped_callback": "<function TemplateErrorView at 0x7fc14c63f940>"
  74. }
  75. },
  76. {
  77. "filename": "django/core/handlers/base.py",
  78. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  79. "function": "_get_response",
  80. "module": "django.core.handlers.base",
  81. "lineno": 143,
  82. "pre_context": [
  83. " \"HttpResponse object. It returned None instead.\"",
  84. " % (middleware_method.__self__.__class__.__name__)",
  85. " )",
  86. "",
  87. " try:"
  88. ],
  89. "context_line": " response = response.render()",
  90. "post_context": [
  91. " except Exception as e:",
  92. " response = self.process_exception_by_middleware(e, request)",
  93. "",
  94. " return response",
  95. ""
  96. ],
  97. "vars": {
  98. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7fc14cb6efa0>",
  99. "request": "<WSGIRequest: GET '/template-error/'>",
  100. "response": "<TemplateResponse status_code=200, \"text/html; charset=utf-8\">",
  101. "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  102. "resolver_match": "ResolverMatch(func=errors.views.TemplateErrorView, args=(), kwargs={}, url_name=template_error, app_names=[], namespaces=[], route=template-error/)",
  103. "callback": "<function TemplateErrorView at 0x7fc14c63f940>",
  104. "callback_args": [],
  105. "callback_kwargs": {},
  106. "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7fc14bc8ce50>",
  107. "wrapped_callback": "<function TemplateErrorView at 0x7fc14c63f940>"
  108. }
  109. },
  110. {
  111. "filename": "django/template/response.py",
  112. "abs_path": "/usr/local/lib/python3.8/site-packages/django/template/response.py",
  113. "function": "render",
  114. "module": "django.template.response",
  115. "lineno": 105,
  116. "pre_context": [
  117. "",
  118. " Return the baked response instance.",
  119. " \"\"\"",
  120. " retval = self",
  121. " if not self._is_rendered:"
  122. ],
  123. "context_line": " self.content = self.rendered_content",
  124. "post_context": [
  125. " for post_callback in self._post_render_callbacks:",
  126. " newretval = post_callback(retval)",
  127. " if newretval is not None:",
  128. " retval = newretval",
  129. " return retval"
  130. ],
  131. "vars": {
  132. "self": "<TemplateResponse status_code=200, \"text/html; charset=utf-8\">",
  133. "retval": "<TemplateResponse status_code=200, \"text/html; charset=utf-8\">"
  134. }
  135. },
  136. {
  137. "filename": "django/urls/base.py",
  138. "abs_path": "/usr/local/lib/python3.8/site-packages/django/urls/base.py",
  139. "function": "reverse",
  140. "module": "django.urls.base",
  141. "lineno": 87,
  142. "pre_context": [
  143. " else:",
  144. " raise NoReverseMatch(\"%s is not a registered namespace\" % key)",
  145. " if ns_pattern:",
  146. " resolver = get_ns_resolver(ns_pattern, resolver, tuple(ns_converters.items()))",
  147. ""
  148. ],
  149. "context_line": " return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))",
  150. "post_context": [
  151. "",
  152. "",
  153. "reverse_lazy = lazy(reverse, str)",
  154. "",
  155. ""
  156. ],
  157. "vars": {
  158. "viewname": "'nope'",
  159. "urlconf": "'django_error_factory.urls'",
  160. "args": [],
  161. "kwargs": {},
  162. "current_app": "''",
  163. "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  164. "prefix": "'/'",
  165. "view": "'nope'",
  166. "path": [],
  167. "current_path": "None"
  168. }
  169. },
  170. {
  171. "filename": "django/urls/resolvers.py",
  172. "abs_path": "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py",
  173. "function": "_reverse_with_prefix",
  174. "module": "django.urls.resolvers",
  175. "lineno": 677,
  176. "pre_context": [
  177. " else:",
  178. " msg = (",
  179. " \"Reverse for '%(view)s' not found. '%(view)s' is not \"",
  180. " \"a valid view function or pattern name.\" % {'view': lookup_view_s}",
  181. " )"
  182. ],
  183. "context_line": " raise NoReverseMatch(msg)",
  184. "post_context": [],
  185. "vars": {
  186. "self": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  187. "lookup_view": "'nope'",
  188. "_prefix": "'/'",
  189. "args": [],
  190. "possibilities": [],
  191. "m": "None",
  192. "n": "None",
  193. "lookup_view_s": "'nope'",
  194. "patterns": [],
  195. "msg": "\"Reverse for 'nope' not found. 'nope' is not a valid view function or pattern name.\""
  196. }
  197. }
  198. ]
  199. }
  200. }
  201. ]
  202. },
  203. "event_id": "3e7c1345914d4924926d795ade8240cb",
  204. "timestamp": "2020-05-13T00:37:49.130239Z",
  205. "breadcrumbs": [],
  206. "transaction": "/template-error/",
  207. "contexts": {
  208. "trace": {
  209. "trace_id": "7f6b76eac5d042b78752db640a848008",
  210. "span_id": "802ffce6fe075f40",
  211. "parent_span_id": "be0f515132150c50",
  212. "op": "django.middleware",
  213. "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__"
  214. },
  215. "runtime": {
  216. "name": "CPython",
  217. "version": "3.8.2",
  218. "build": "3.8.2 (default, Apr 23 2020, 14:32:57) \n[GCC 8.3.0]"
  219. }
  220. },
  221. "modules": {
  222. "wheel": "0.34.2",
  223. "webencodings": "0.5.1",
  224. "attrs": "19.3.0",
  225. "asgiref": "3.2.7",
  226. "appdirs": "1.4.3"
  227. },
  228. "extra": {
  229. "sys.argv": [
  230. "./manage.py",
  231. "runserver",
  232. "0.0.0.0:8001"
  233. ]
  234. },
  235. "request": {
  236. "url": "http://localhost:8001/template-error/",
  237. "query_string": "",
  238. "method": "GET",
  239. "env": {
  240. "SERVER_NAME": "4c55e9e8d666",
  241. "SERVER_PORT": "8001"
  242. },
  243. "headers": {
  244. "Content-Length": "",
  245. "Content-Type": "text/plain",
  246. "Host": "localhost:8001",
  247. "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0",
  248. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  249. "Accept-Language": "en-US,en;q=0.5",
  250. "Accept-Encoding": "gzip, deflate",
  251. "Connection": "keep-alive",
  252. "Referer": "http://localhost:8001/",
  253. "Cookie": "",
  254. "Upgrade-Insecure-Requests": "1",
  255. "Dnt": "1"
  256. }
  257. },
  258. "server_name": "4c55e9e8d666",
  259. "sdk": {
  260. "name": "sentry.python",
  261. "version": "0.14.3",
  262. "packages": [
  263. {
  264. "name": "pypi:sentry-sdk",
  265. "version": "0.14.3"
  266. }
  267. ],
  268. "integrations": [
  269. "argv",
  270. "atexit",
  271. "dedupe",
  272. "django",
  273. "excepthook",
  274. "logging",
  275. "modules",
  276. "stdlib",
  277. "threading"
  278. ]
  279. },
  280. "platform": "python",
  281. "_meta": {
  282. "exception": {
  283. "values": {
  284. "0": {
  285. "stacktrace": {
  286. "frames": {
  287. "12": {
  288. "vars": {
  289. "": {
  290. "len": 13
  291. }
  292. }
  293. },
  294. "13": {
  295. "vars": {
  296. "": {
  297. "len": 11
  298. }
  299. }
  300. }
  301. }
  302. }
  303. }
  304. }
  305. },
  306. "request": {
  307. "headers": {
  308. "Cookie": {
  309. "": {
  310. "rem": [
  311. [
  312. "!config",
  313. "x",
  314. 0,
  315. 373
  316. ]
  317. ]
  318. }
  319. }
  320. }
  321. }
  322. }
  323. }