python_zero_division.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. {
  2. "event_id": "dd9e1afb828a44d5b4df0183adaee5d8",
  3. "project": 3,
  4. "release": null,
  5. "dist": null,
  6. "platform": "python",
  7. "message": "",
  8. "datetime": "2020-05-02T16:54:20.488000Z",
  9. "time_spent": null,
  10. "tags": [
  11. ["browser", "Firefox 75.0"],
  12. ["browser.name", "Firefox"],
  13. ["handled", "no"],
  14. ["level", "error"],
  15. ["mechanism", "django"],
  16. ["os.name", "Ubuntu"],
  17. ["runtime", "CPython 3.8.2"],
  18. ["runtime.name", "CPython"],
  19. ["server_name", "2f96b0310f37"],
  20. ["transaction", "/divide-zero/"],
  21. ["url", "http://localhost:8001/divide-zero/"]
  22. ],
  23. "contexts": {
  24. "runtime": {
  25. "version": "3.8.2",
  26. "type": "runtime",
  27. "name": "CPython",
  28. "build": "3.8.2 (default, Apr 23 2020, 14:32:57) \n[GCC 8.3.0]"
  29. },
  30. "os": { "version": null, "name": "Ubuntu" },
  31. "trace": {
  32. "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
  33. "parent_span_id": "a3a4374fe17c42a0",
  34. "trace_id": "9aaeffa209dd4e2d85a084826e8ef964",
  35. "op": "django.middleware",
  36. "type": "trace",
  37. "span_id": "a8483a699fbe8ac6"
  38. },
  39. "browser": { "version": "75.0", "name": "Firefox" }
  40. },
  41. "culprit": "/divide-zero/",
  42. "exception": {
  43. "values": [
  44. {
  45. "stacktrace": {
  46. "frames": [
  47. {
  48. "function": "inner",
  49. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
  50. "pre_context": [
  51. " can rely on getting a response instead of an exception.",
  52. " \"\"\"",
  53. " @wraps(get_response)",
  54. " def inner(request):",
  55. " try:"
  56. ],
  57. "vars": {
  58. "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f181f5b9fa0>>",
  59. "request": "<WSGIRequest: GET '/divide-zero/'>",
  60. "exc": "ZeroDivisionError('division by zero')"
  61. },
  62. "module": "django.core.handlers.exception",
  63. "filename": "django/core/handlers/exception.py",
  64. "post_context": [
  65. " except Exception as exc:",
  66. " response = response_for_exception(request, exc)",
  67. " return response",
  68. " return inner",
  69. ""
  70. ],
  71. "in_app": false,
  72. "context_line": " response = get_response(request)",
  73. "lineno": 34
  74. },
  75. {
  76. "function": "_get_response",
  77. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  78. "pre_context": [
  79. " if response is None:",
  80. " wrapped_callback = self.make_view_atomic(callback)",
  81. " try:",
  82. " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
  83. " except Exception as e:"
  84. ],
  85. "vars": {
  86. "resolver_match": "ResolverMatch(func=errors.views.DivideZeroView, args=(), kwargs={}, url_name=divide_zero, app_names=[], namespaces=[], route=divide-zero/)",
  87. "callback_args": [],
  88. "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f181e7299d0>",
  89. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f181f5b9fa0>",
  90. "request": "<WSGIRequest: GET '/divide-zero/'>",
  91. "callback": "<function DivideZeroView at 0x7f181e818d30>",
  92. "wrapped_callback": "<function DivideZeroView at 0x7f181e818d30>",
  93. "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  94. "callback_kwargs": {},
  95. "response": "None"
  96. },
  97. "module": "django.core.handlers.base",
  98. "filename": "django/core/handlers/base.py",
  99. "post_context": [
  100. "",
  101. " # Complain if the view returned None (a common error).",
  102. " if response is None:",
  103. " if isinstance(callback, types.FunctionType): # FBV",
  104. " view_name = callback.__name__"
  105. ],
  106. "in_app": false,
  107. "context_line": " response = self.process_exception_by_middleware(e, request)",
  108. "lineno": 115
  109. },
  110. {
  111. "function": "_get_response",
  112. "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
  113. "pre_context": [
  114. " break",
  115. "",
  116. " if response is None:",
  117. " wrapped_callback = self.make_view_atomic(callback)",
  118. " try:"
  119. ],
  120. "vars": {
  121. "resolver_match": "ResolverMatch(func=errors.views.DivideZeroView, args=(), kwargs={}, url_name=divide_zero, app_names=[], namespaces=[], route=divide-zero/)",
  122. "callback_args": [],
  123. "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f181e7299d0>",
  124. "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f181f5b9fa0>",
  125. "request": "<WSGIRequest: GET '/divide-zero/'>",
  126. "callback": "<function DivideZeroView at 0x7f181e818d30>",
  127. "wrapped_callback": "<function DivideZeroView at 0x7f181e818d30>",
  128. "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
  129. "callback_kwargs": {},
  130. "response": "None"
  131. },
  132. "module": "django.core.handlers.base",
  133. "filename": "django/core/handlers/base.py",
  134. "post_context": [
  135. " except Exception as e:",
  136. " response = self.process_exception_by_middleware(e, request)",
  137. "",
  138. " # Complain if the view returned None (a common error).",
  139. " if response is None:"
  140. ],
  141. "in_app": false,
  142. "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
  143. "lineno": 113
  144. },
  145. {
  146. "function": "view",
  147. "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
  148. "pre_context": [
  149. " if not hasattr(self, 'request'):",
  150. " raise AttributeError(",
  151. " \"%s instance has no 'request' attribute. Did you override \"",
  152. " \"setup() and forget to call super()?\" % cls.__name__",
  153. " )"
  154. ],
  155. "vars": {
  156. "initkwargs": {},
  157. "self": "<errors.views.DivideZeroView object at 0x7f181e6651f0>",
  158. "args": [],
  159. "request": "<WSGIRequest: GET '/divide-zero/'>",
  160. "kwargs": {},
  161. "cls": "<class 'errors.views.DivideZeroView'>"
  162. },
  163. "module": "django.views.generic.base",
  164. "filename": "django/views/generic/base.py",
  165. "post_context": [
  166. " view.view_class = cls",
  167. " view.view_initkwargs = initkwargs",
  168. "",
  169. " # take name and docstring from class",
  170. " update_wrapper(view, cls, updated=())"
  171. ],
  172. "in_app": false,
  173. "context_line": " return self.dispatch(request, *args, **kwargs)",
  174. "lineno": 71
  175. },
  176. {
  177. "function": "dispatch",
  178. "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
  179. "pre_context": [
  180. " # request method isn't on the approved list.",
  181. " if request.method.lower() in self.http_method_names:",
  182. " handler = getattr(self, request.method.lower(), self.http_method_not_allowed)",
  183. " else:",
  184. " handler = self.http_method_not_allowed"
  185. ],
  186. "vars": {
  187. "self": "<errors.views.DivideZeroView object at 0x7f181e6651f0>",
  188. "handler": "<bound method DivideZeroView.get of <errors.views.DivideZeroView object at 0x7f181e6651f0>>",
  189. "request": "<WSGIRequest: GET '/divide-zero/'>",
  190. "args": [],
  191. "kwargs": {}
  192. },
  193. "module": "django.views.generic.base",
  194. "filename": "django/views/generic/base.py",
  195. "post_context": [
  196. "",
  197. " def http_method_not_allowed(self, request, *args, **kwargs):",
  198. " logger.warning(",
  199. " 'Method Not Allowed (%s): %s', request.method, request.path,",
  200. " extra={'status_code': 405, 'request': request}"
  201. ],
  202. "in_app": false,
  203. "context_line": " return handler(request, *args, **kwargs)",
  204. "lineno": 97
  205. },
  206. {
  207. "function": "get",
  208. "abs_path": "/code/errors/views.py",
  209. "pre_context": [
  210. " template_name = \"home.html\"",
  211. "",
  212. "",
  213. "class DivideZeroView(View):",
  214. " def get(self, request, *args, **kwargs):"
  215. ],
  216. "vars": {
  217. "self": "<errors.views.DivideZeroView object at 0x7f181e6651f0>",
  218. "args": [],
  219. "request": "<WSGIRequest: GET '/divide-zero/'>",
  220. "kwargs": {}
  221. },
  222. "module": "errors.views",
  223. "filename": "errors/views.py",
  224. "post_context": [
  225. "",
  226. "",
  227. "class DatabaseErrorView(View):",
  228. " def get(self, request, *args, **kwargs):",
  229. " User.objects.get(id=\"9999999\")"
  230. ],
  231. "in_app": false,
  232. "context_line": " 0/0",
  233. "lineno": 18
  234. }
  235. ]
  236. },
  237. "type": "ZeroDivisionError",
  238. "mechanism": { "type": "django", "handled": false },
  239. "value": "division by zero"
  240. }
  241. ]
  242. },
  243. "extra": { "sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"] },
  244. "fingerprint": ["{{ default }}"],
  245. "grouping_config": { "id": "legacy:2019-03-12" },
  246. "hashes": ["6c64a182729809288e28b95b0258be01"],
  247. "key_id": "3",
  248. "level": "error",
  249. "location": "errors/views.py",
  250. "logger": "",
  251. "metadata": {
  252. "function": "get",
  253. "type": "ZeroDivisionError",
  254. "value": "division by zero",
  255. "filename": "errors/views.py"
  256. },
  257. "modules": { "wheel": "0.34.2", "appdirs": "1.4.3" },
  258. "received": 1588444676.656,
  259. "request": {
  260. "url": "http://localhost:8001/divide-zero/",
  261. "headers": [
  262. [
  263. "Accept",
  264. "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
  265. ],
  266. ["Accept-Encoding", "gzip, deflate"],
  267. ["Accept-Language", "en-US,en;q=0.5"],
  268. ["Connection", "keep-alive"],
  269. ["Content-Length", ""],
  270. ["Content-Type", "text/plain"],
  271. ["Host", "localhost:8001"],
  272. ["Referer", "http://localhost:8001/"],
  273. ["Upgrade-Insecure-Requests", "1"],
  274. [
  275. "User-Agent",
  276. "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0"
  277. ]
  278. ],
  279. "method": "GET",
  280. "env": { "SERVER_NAME": "2f96b0310f37", "SERVER_PORT": "8001" },
  281. "query_string": [
  282. ["foo", "bar"],
  283. ["foo", "bars"],
  284. ["lol", "ha"]
  285. ],
  286. "inferred_content_type": "text/plain"
  287. },
  288. "sdk": {
  289. "version": "0.14.3",
  290. "name": "sentry.python",
  291. "packages": [{ "version": "0.14.3", "name": "pypi:sentry-sdk" }],
  292. "integrations": [
  293. "argv",
  294. "atexit",
  295. "dedupe",
  296. "django",
  297. "excepthook",
  298. "logging",
  299. "modules",
  300. "stdlib",
  301. "threading"
  302. ]
  303. },
  304. "timestamp": 1588438460.488,
  305. "title": "ZeroDivisionError: division by zero",
  306. "transaction": "/divide-zero/",
  307. "type": "error",
  308. "use_rust_normalize": true,
  309. "version": "7"
  310. }