12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694 |
- divide_zero = {
- "level": "error",
- "exception": {
- "values": [
- {
- "module": None,
- "type": "ZeroDivisionError",
- "value": "division by zero",
- "mechanism": {"type": "django", "handled": False},
- "stacktrace": {
- "frames": [
- {
- "filename": "django/core/handlers/exception.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
- "function": "inner",
- "module": "django.core.handlers.exception",
- "lineno": 34,
- "pre_context": [
- " can rely on getting a response instead of an exception.",
- ' """',
- " @wraps(get_response)",
- " def inner(request):",
- " try:",
- ],
- "context_line": " response = get_response(request)",
- "post_context": [
- " except Exception as exc:",
- " response = response_for_exception(request, exc)",
- " return response",
- " return inner",
- "",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "exc": "ZeroDivisionError('division by zero')",
- "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 115,
- "pre_context": [
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- " except Exception as e:",
- ],
- "context_line": " response = self.process_exception_by_middleware(e, request)",
- "post_context": [
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- " if isinstance(callback, types.FunctionType): # FBV",
- " view_name = callback.__name__",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DivideZeroView, args=(), kwargs={}, url_name=divide_zero, app_names=[], namespaces=[], route=divide-zero/)",
- "callback": "<function DivideZeroView at 0x7f62d402fe50>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DivideZeroView at 0x7f62d402fe50>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 113,
- "pre_context": [
- " break",
- "",
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- ],
- "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- "post_context": [
- " except Exception as e:",
- " response = self.process_exception_by_middleware(e, request)",
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DivideZeroView, args=(), kwargs={}, url_name=divide_zero, app_names=[], namespaces=[], route=divide-zero/)",
- "callback": "<function DivideZeroView at 0x7f62d402fe50>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DivideZeroView at 0x7f62d402fe50>",
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "view",
- "module": "django.views.generic.base",
- "lineno": 71,
- "pre_context": [
- " if not hasattr(self, 'request'):",
- " raise AttributeError(",
- " \"%s instance has no 'request' attribute. Did you override \"",
- ' "setup() and forget to call super()?" % cls.__name__',
- " )",
- ],
- "context_line": " return self.dispatch(request, *args, **kwargs)",
- "post_context": [
- " view.view_class = cls",
- " view.view_initkwargs = initkwargs",
- "",
- " # take name and docstring from class",
- " update_wrapper(view, cls, updated=())",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "args": [],
- "kwargs": {},
- "self": "<errors.views.DivideZeroView object at 0x7f62d2d20100>",
- "cls": "<class 'errors.views.DivideZeroView'>",
- "initkwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "dispatch",
- "module": "django.views.generic.base",
- "lineno": 97,
- "pre_context": [
- " # request method isn't on the approved list.",
- " if request.method.lower() in self.http_method_names:",
- " handler = getattr(self, request.method.lower(), self.http_method_not_allowed)",
- " else:",
- " handler = self.http_method_not_allowed",
- ],
- "context_line": " return handler(request, *args, **kwargs)",
- "post_context": [
- "",
- " def http_method_not_allowed(self, request, *args, **kwargs):",
- " logger.warning(",
- " 'Method Not Allowed (%s): %s', request.method, request.path,",
- " extra={'status_code': 405, 'request': request}",
- ],
- "vars": {
- "self": "<errors.views.DivideZeroView object at 0x7f62d2d20100>",
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "args": [],
- "kwargs": {},
- "handler": "<bound method DivideZeroView.get of <errors.views.DivideZeroView object at 0x7f62d2d20100>>",
- },
- "in_app": True,
- },
- {
- "filename": "errors/views.py",
- "abs_path": "/code/errors/views.py",
- "function": "get",
- "module": "errors.views",
- "lineno": 12,
- "pre_context": [
- ' template_name = "home.html"',
- "",
- "",
- "class DivideZeroView(View):",
- " def get(self, request, *args, **kwargs):",
- ],
- "context_line": " 0/0",
- "post_context": [
- "",
- "",
- "class DatabaseErrorView(View):",
- " def get(self, request, *args, **kwargs):",
- ' User.objects.get(id="9999999")',
- ],
- "vars": {
- "self": "<errors.views.DivideZeroView object at 0x7f62d2d20100>",
- "request": "<WSGIRequest: GET '/divide-zero/'>",
- "args": [],
- "kwargs": {},
- },
- "in_app": True,
- },
- ]
- },
- }
- ]
- },
- "event_id": "3eb248c5287a4c2fbaa427da654c3795",
- "timestamp": "2020-01-10T20:21:46.434385Z",
- "breadcrumbs": [],
- "transaction": "/divide-zero/",
- "contexts": {
- "trace": {
- "trace_id": "fd41c870fbd44f76ad9f051b488b88bc",
- "span_id": "9bb4230421b756c2",
- "parent_span_id": "a0637603c584f464",
- "op": "django.middleware",
- "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
- },
- "runtime": {
- "name": "CPython",
- "version": "3.8.1",
- "build": "3.8.1 (default, Jan 3 2020, 22:55:55) \n[GCC 8.3.0]",
- },
- },
- "modules": {
- "wheel": "0.33.6",
- "webencodings": "0.5.1",
- "wcwidth": "0.1.8",
- "urllib3": "1.25.7",
- "typed-ast": "1.4.0",
- "traitlets": "4.3.3",
- "tomlkit": "0.5.8",
- "toml": "0.10.0",
- "sqlparse": "0.3.0",
- "six": "1.13.0",
- "shellingham": "1.3.1",
- "setuptools": "44.0.0",
- "sentry-sdk": "0.14.0",
- "secretstorage": "3.1.1",
- "requests": "2.22.0",
- "requests-toolbelt": "0.8.0",
- "regex": "2020.1.8",
- "pytz": "2019.3",
- "pyrsistent": "0.14.11",
- "pyparsing": "2.4.6",
- "pylev": "1.3.0",
- "pygments": "2.5.2",
- "pycparser": "2.19",
- "ptyprocess": "0.6.0",
- "prompt-toolkit": "3.0.2",
- "poetry": "1.0.0",
- "pkginfo": "1.5.0.1",
- "pip": "19.3.1",
- "pickleshare": "0.7.5",
- "pexpect": "4.7.0",
- "pathspec": "0.7.0",
- "pastel": "0.1.1",
- "parso": "0.5.2",
- "msgpack": "0.6.2",
- "lockfile": "0.12.2",
- "keyring": "19.3.0",
- "jsonschema": "3.2.0",
- "jeepney": "0.4.2",
- "jedi": "0.15.2",
- "ipython": "7.11.1",
- "ipython-genutils": "0.2.0",
- "ipdb": "0.12.3",
- "idna": "2.8",
- "html5lib": "1.0.1",
- "django": "3.0.2",
- "decorator": "4.4.1",
- "cryptography": "2.8",
- "clikit": "0.4.1",
- "click": "7.0",
- "cleo": "0.7.6",
- "chardet": "3.0.4",
- "cffi": "1.13.2",
- "certifi": "2019.11.28",
- "cachy": "0.3.0",
- "cachecontrol": "0.12.6",
- "black": "19.10b0",
- "backcall": "0.1.0",
- "attrs": "19.3.0",
- "asgiref": "3.2.3",
- "appdirs": "1.4.3",
- },
- "extra": {"sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"]},
- "request": {
- "url": "http://localhost:8001/divide-zero/",
- "query_string": "",
- "method": "GET",
- "env": {"SERVER_NAME": "210ecca56d59", "SERVER_PORT": "8001"},
- "headers": {
- "Content-Length": "",
- "Content-Type": "text/plain",
- "Host": "localhost:8001",
- "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Accept-Language": "en-US,en;q=0.5",
- "Accept-Encoding": "gzip, deflate",
- "Referer": "http://localhost:8001/",
- "Connection": "keep-alive",
- "Upgrade-Insecure-Requests": "1",
- "Dnt": "1",
- },
- },
- "server_name": "210ecca56d59",
- "sdk": {
- "name": "sentry.python",
- "version": "0.14.0",
- "packages": [{"name": "pypi:sentry-sdk", "version": "0.14.0"}],
- "integrations": [
- "argv",
- "atexit",
- "dedupe",
- "django",
- "excepthook",
- "logging",
- "modules",
- "stdlib",
- "threading",
- ],
- },
- "platform": "python",
- "_meta": {
- "request": {"headers": {"Cookie": {"": {"rem": [["!config", "x", 0, 315]]}}}}
- },
- }
- database_error = {
- "level": "error",
- "exception": {
- "values": [
- {
- "module": "django.contrib.auth.models",
- "type": "User.DoesNotExist",
- "value": "User matching query does not exist.",
- "mechanism": {"type": "django", "handled": False},
- "stacktrace": {
- "frames": [
- {
- "filename": "django/core/handlers/exception.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
- "function": "inner",
- "module": "django.core.handlers.exception",
- "lineno": 34,
- "pre_context": [
- " can rely on getting a response instead of an exception.",
- ' """',
- " @wraps(get_response)",
- " def inner(request):",
- " try:",
- ],
- "context_line": " response = get_response(request)",
- "post_context": [
- " except Exception as exc:",
- " response = response_for_exception(request, exc)",
- " return response",
- " return inner",
- "",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/database-error/'>",
- "exc": "DoesNotExist('User matching query does not exist.')",
- "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 115,
- "pre_context": [
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- " except Exception as e:",
- ],
- "context_line": " response = self.process_exception_by_middleware(e, request)",
- "post_context": [
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- " if isinstance(callback, types.FunctionType): # FBV",
- " view_name = callback.__name__",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/database-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DatabaseErrorView, args=(), kwargs={}, url_name=database_error, app_names=[], namespaces=[], route=database-error/)",
- "callback": "<function DatabaseErrorView at 0x7f62d403d1f0>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DatabaseErrorView at 0x7f62d403d1f0>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 113,
- "pre_context": [
- " break",
- "",
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- ],
- "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- "post_context": [
- " except Exception as e:",
- " response = self.process_exception_by_middleware(e, request)",
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/database-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DatabaseErrorView, args=(), kwargs={}, url_name=database_error, app_names=[], namespaces=[], route=database-error/)",
- "callback": "<function DatabaseErrorView at 0x7f62d403d1f0>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DatabaseErrorView at 0x7f62d403d1f0>",
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "view",
- "module": "django.views.generic.base",
- "lineno": 71,
- "pre_context": [
- " if not hasattr(self, 'request'):",
- " raise AttributeError(",
- " \"%s instance has no 'request' attribute. Did you override \"",
- ' "setup() and forget to call super()?" % cls.__name__',
- " )",
- ],
- "context_line": " return self.dispatch(request, *args, **kwargs)",
- "post_context": [
- " view.view_class = cls",
- " view.view_initkwargs = initkwargs",
- "",
- " # take name and docstring from class",
- " update_wrapper(view, cls, updated=())",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/database-error/'>",
- "args": [],
- "kwargs": {},
- "self": "<errors.views.DatabaseErrorView object at 0x7f62d2d24670>",
- "cls": "<class 'errors.views.DatabaseErrorView'>",
- "initkwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "dispatch",
- "module": "django.views.generic.base",
- "lineno": 97,
- "pre_context": [
- " # request method isn't on the approved list.",
- " if request.method.lower() in self.http_method_names:",
- " handler = getattr(self, request.method.lower(), self.http_method_not_allowed)",
- " else:",
- " handler = self.http_method_not_allowed",
- ],
- "context_line": " return handler(request, *args, **kwargs)",
- "post_context": [
- "",
- " def http_method_not_allowed(self, request, *args, **kwargs):",
- " logger.warning(",
- " 'Method Not Allowed (%s): %s', request.method, request.path,",
- " extra={'status_code': 405, 'request': request}",
- ],
- "vars": {
- "self": "<errors.views.DatabaseErrorView object at 0x7f62d2d24670>",
- "request": "<WSGIRequest: GET '/database-error/'>",
- "args": [],
- "kwargs": {},
- "handler": "<bound method DatabaseErrorView.get of <errors.views.DatabaseErrorView object at 0x7f62d2d24670>>",
- },
- "in_app": True,
- },
- {
- "filename": "errors/views.py",
- "abs_path": "/code/errors/views.py",
- "function": "get",
- "module": "errors.views",
- "lineno": 17,
- "pre_context": [
- " 0/0",
- "",
- "",
- "class DatabaseErrorView(View):",
- " def get(self, request, *args, **kwargs):",
- ],
- "context_line": ' User.objects.get(id="9999999")',
- "post_context": [
- "",
- "",
- "class PostErrorView(View):",
- " def post(self, request, *args, **kwargs):",
- ' request.POST["nope"]',
- ],
- "vars": {
- "self": "<errors.views.DatabaseErrorView object at 0x7f62d2d24670>",
- "request": "<WSGIRequest: GET '/database-error/'>",
- "args": [],
- "kwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/db/models/manager.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py",
- "function": "manager_method",
- "module": "django.db.models.manager",
- "lineno": 82,
- "pre_context": [
- "",
- " @classmethod",
- " def _get_queryset_methods(cls, queryset_class):",
- " def create_method(name, method):",
- " def manager_method(self, *args, **kwargs):",
- ],
- "context_line": " return getattr(self.get_queryset(), name)(*args, **kwargs)",
- "post_context": [
- " manager_method.__name__ = method.__name__",
- " manager_method.__doc__ = method.__doc__",
- " return manager_method",
- "",
- " new_methods = {}",
- ],
- "vars": {
- "self": "<django.contrib.auth.models.UserManager object at 0x7f62d410be20>",
- "args": [],
- "kwargs": {"id": "'9999999'"},
- "name": "'get'",
- },
- "in_app": True,
- },
- {
- "filename": "django/db/models/query.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/db/models/query.py",
- "function": "get",
- "module": "django.db.models.query",
- "lineno": 415,
- "pre_context": [
- " clone.query.set_limits(high=limit)",
- " num = len(clone)",
- " if num == 1:",
- " return clone._result_cache[0]",
- " if not num:",
- ],
- "context_line": " raise self.model.DoesNotExist(",
- "post_context": [
- ' "%s matching query does not exist." %',
- " self.model._meta.object_name",
- " )",
- " raise self.model.MultipleObjectsReturned(",
- " 'get() returned more than one %s -- it returned %s!' % (",
- ],
- "vars": {
- "self": "<QuerySet from django.db.models.query at 0x7f62d2d24340>",
- "args": [],
- "kwargs": {"id": "'9999999'"},
- "clone": "<QuerySet from django.db.models.query at 0x7f62d2d24460>",
- "limit": "21",
- "num": "0",
- },
- "in_app": True,
- },
- ]
- },
- }
- ]
- },
- "event_id": "f84f7731ece04760a43fe1d777734fef",
- "timestamp": "2020-01-10T20:23:23.513387Z",
- "breadcrumbs": [
- {
- "message": 'SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = %s LIMIT 21',
- "category": "query",
- "data": {},
- "timestamp": "2020-01-10T20:23:23.508243Z",
- "type": "default",
- }
- ],
- "transaction": "/database-error/",
- "contexts": {
- "trace": {
- "trace_id": "b56f4a334dbb4409bed0055b1c51d70a",
- "span_id": "bceca618ab73060c",
- "parent_span_id": "995f271d2ef32861",
- "op": "django.middleware",
- "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
- },
- "runtime": {
- "name": "CPython",
- "version": "3.8.1",
- "build": "3.8.1 (default, Jan 3 2020, 22:55:55) \n[GCC 8.3.0]",
- },
- },
- "modules": {
- "wheel": "0.33.6",
- "webencodings": "0.5.1",
- "wcwidth": "0.1.8",
- "urllib3": "1.25.7",
- "typed-ast": "1.4.0",
- "traitlets": "4.3.3",
- "tomlkit": "0.5.8",
- "toml": "0.10.0",
- "sqlparse": "0.3.0",
- "six": "1.13.0",
- "shellingham": "1.3.1",
- "setuptools": "44.0.0",
- "sentry-sdk": "0.14.0",
- "secretstorage": "3.1.1",
- "requests": "2.22.0",
- "requests-toolbelt": "0.8.0",
- "regex": "2020.1.8",
- "pytz": "2019.3",
- "pyrsistent": "0.14.11",
- "pyparsing": "2.4.6",
- "pylev": "1.3.0",
- "pygments": "2.5.2",
- "pycparser": "2.19",
- "ptyprocess": "0.6.0",
- "prompt-toolkit": "3.0.2",
- "poetry": "1.0.0",
- "pkginfo": "1.5.0.1",
- "pip": "19.3.1",
- "pickleshare": "0.7.5",
- "pexpect": "4.7.0",
- "pathspec": "0.7.0",
- "pastel": "0.1.1",
- "parso": "0.5.2",
- "msgpack": "0.6.2",
- "lockfile": "0.12.2",
- "keyring": "19.3.0",
- "jsonschema": "3.2.0",
- "jeepney": "0.4.2",
- "jedi": "0.15.2",
- "ipython": "7.11.1",
- "ipython-genutils": "0.2.0",
- "ipdb": "0.12.3",
- "idna": "2.8",
- "html5lib": "1.0.1",
- "django": "3.0.2",
- "decorator": "4.4.1",
- "cryptography": "2.8",
- "clikit": "0.4.1",
- "click": "7.0",
- "cleo": "0.7.6",
- "chardet": "3.0.4",
- "cffi": "1.13.2",
- "certifi": "2019.11.28",
- "cachy": "0.3.0",
- "cachecontrol": "0.12.6",
- "black": "19.10b0",
- "backcall": "0.1.0",
- "attrs": "19.3.0",
- "asgiref": "3.2.3",
- "appdirs": "1.4.3",
- },
- "extra": {"sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"]},
- "request": {
- "url": "http://localhost:8001/database-error/",
- "query_string": "",
- "method": "GET",
- "env": {"SERVER_NAME": "210ecca56d59", "SERVER_PORT": "8001"},
- "headers": {
- "Content-Length": "",
- "Content-Type": "text/plain",
- "Host": "localhost:8001",
- "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Accept-Language": "en-US,en;q=0.5",
- "Accept-Encoding": "gzip, deflate",
- "Connection": "keep-alive",
- "Referer": "http://localhost:8001/",
- "Cookie": "",
- "Upgrade-Insecure-Requests": "1",
- "Dnt": "1",
- },
- },
- "server_name": "210ecca56d59",
- "sdk": {
- "name": "sentry.python",
- "version": "0.14.0",
- "packages": [{"name": "pypi:sentry-sdk", "version": "0.14.0"}],
- "integrations": [
- "argv",
- "atexit",
- "dedupe",
- "django",
- "excepthook",
- "logging",
- "modules",
- "stdlib",
- "threading",
- ],
- },
- "platform": "python",
- "_meta": {
- "request": {"headers": {"Cookie": {"": {"rem": [["!config", "x", 0, 315]]}}}}
- },
- }
- post_error = {
- "level": "error",
- "exception": {
- "values": [
- {
- "module": None,
- "type": "KeyError",
- "value": "'nope'",
- "mechanism": {"type": "django", "handled": False},
- "stacktrace": {
- "frames": [
- {
- "filename": "django/utils/datastructures.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/utils/datastructures.py",
- "function": "__getitem__",
- "module": "django.utils.datastructures",
- "lineno": 76,
- "pre_context": [
- ' """',
- " Return the last data value for this key, or [] if it's an empty list;",
- " raise KeyError if not found.",
- ' """',
- " try:",
- ],
- "context_line": " list_ = super().__getitem__(key)",
- "post_context": [
- " except KeyError:",
- " raise MultiValueDictKeyError(key)",
- " try:",
- " return list_[-1]",
- " except IndexError:",
- ],
- "vars": {
- "self": {
- "csrfmiddlewaretoken": "'G1Cfr5bnrZz4ICfiDwPdGMY865fvWB1RN1RZD2vJCYxaEJsQfFX1QUdlKEwNfELr'",
- "param1": "'val'",
- },
- "key": "'nope'",
- "__class__": "<class 'django.utils.datastructures.MultiValueDict'>",
- },
- "in_app": True,
- }
- ]
- },
- },
- {
- "module": "django.utils.datastructures",
- "type": "MultiValueDictKeyError",
- "value": "'nope'",
- "mechanism": {"type": "django", "handled": False},
- "stacktrace": {
- "frames": [
- {
- "filename": "django/core/handlers/exception.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
- "function": "inner",
- "module": "django.core.handlers.exception",
- "lineno": 34,
- "pre_context": [
- " can rely on getting a response instead of an exception.",
- ' """',
- " @wraps(get_response)",
- " def inner(request):",
- " try:",
- ],
- "context_line": " response = get_response(request)",
- "post_context": [
- " except Exception as exc:",
- " response = response_for_exception(request, exc)",
- " return response",
- " return inner",
- "",
- ],
- "vars": {
- "request": "<WSGIRequest: POST '/post-error/'>",
- "exc": "MultiValueDictKeyError('nope')",
- "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 115,
- "pre_context": [
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- " except Exception as e:",
- ],
- "context_line": " response = self.process_exception_by_middleware(e, request)",
- "post_context": [
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- " if isinstance(callback, types.FunctionType): # FBV",
- " view_name = callback.__name__",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: POST '/post-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.PostErrorView, args=(), kwargs={}, url_name=post_error, app_names=[], namespaces=[], route=post-error/)",
- "callback": "<function PostErrorView at 0x7f62d403d280>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function PostErrorView at 0x7f62d403d280>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 113,
- "pre_context": [
- " break",
- "",
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- ],
- "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- "post_context": [
- " except Exception as e:",
- " response = self.process_exception_by_middleware(e, request)",
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: POST '/post-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.PostErrorView, args=(), kwargs={}, url_name=post_error, app_names=[], namespaces=[], route=post-error/)",
- "callback": "<function PostErrorView at 0x7f62d403d280>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function PostErrorView at 0x7f62d403d280>",
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "view",
- "module": "django.views.generic.base",
- "lineno": 71,
- "pre_context": [
- " if not hasattr(self, 'request'):",
- " raise AttributeError(",
- " \"%s instance has no 'request' attribute. Did you override \"",
- ' "setup() and forget to call super()?" % cls.__name__',
- " )",
- ],
- "context_line": " return self.dispatch(request, *args, **kwargs)",
- "post_context": [
- " view.view_class = cls",
- " view.view_initkwargs = initkwargs",
- "",
- " # take name and docstring from class",
- " update_wrapper(view, cls, updated=())",
- ],
- "vars": {
- "request": "<WSGIRequest: POST '/post-error/'>",
- "args": [],
- "kwargs": {},
- "self": "<errors.views.PostErrorView object at 0x7f62d2227ac0>",
- "cls": "<class 'errors.views.PostErrorView'>",
- "initkwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "dispatch",
- "module": "django.views.generic.base",
- "lineno": 97,
- "pre_context": [
- " # request method isn't on the approved list.",
- " if request.method.lower() in self.http_method_names:",
- " handler = getattr(self, request.method.lower(), self.http_method_not_allowed)",
- " else:",
- " handler = self.http_method_not_allowed",
- ],
- "context_line": " return handler(request, *args, **kwargs)",
- "post_context": [
- "",
- " def http_method_not_allowed(self, request, *args, **kwargs):",
- " logger.warning(",
- " 'Method Not Allowed (%s): %s', request.method, request.path,",
- " extra={'status_code': 405, 'request': request}",
- ],
- "vars": {
- "self": "<errors.views.PostErrorView object at 0x7f62d2227ac0>",
- "request": "<WSGIRequest: POST '/post-error/'>",
- "args": [],
- "kwargs": {},
- "handler": "<bound method PostErrorView.post of <errors.views.PostErrorView object at 0x7f62d2227ac0>>",
- },
- "in_app": True,
- },
- {
- "filename": "errors/views.py",
- "abs_path": "/code/errors/views.py",
- "function": "post",
- "module": "errors.views",
- "lineno": 22,
- "pre_context": [
- ' User.objects.get(id="9999999")',
- "",
- "",
- "class PostErrorView(View):",
- " def post(self, request, *args, **kwargs):",
- ],
- "context_line": ' request.POST["nope"]',
- "post_context": [
- "",
- "",
- "class DatabaseStackErrorView(View):",
- " def get(self, request, *args, **kwargs):",
- " users = User.objects.all()",
- ],
- "vars": {
- "self": "<errors.views.PostErrorView object at 0x7f62d2227ac0>",
- "request": "<WSGIRequest: POST '/post-error/'>",
- "args": [],
- "kwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/utils/datastructures.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/utils/datastructures.py",
- "function": "__getitem__",
- "module": "django.utils.datastructures",
- "lineno": 78,
- "pre_context": [
- " raise KeyError if not found.",
- ' """',
- " try:",
- " list_ = super().__getitem__(key)",
- " except KeyError:",
- ],
- "context_line": " raise MultiValueDictKeyError(key)",
- "post_context": [
- " try:",
- " return list_[-1]",
- " except IndexError:",
- " return []",
- "",
- ],
- "vars": {
- "self": {
- "csrfmiddlewaretoken": "'G1Cfr5bnrZz4ICfiDwPdGMY865fvWB1RN1RZD2vJCYxaEJsQfFX1QUdlKEwNfELr'",
- "param1": "'val'",
- },
- "key": "'nope'",
- "__class__": "<class 'django.utils.datastructures.MultiValueDict'>",
- },
- "in_app": True,
- },
- ]
- },
- },
- ]
- },
- "event_id": "33338bdfb1024cffa7a023c22e36436c",
- "timestamp": "2020-01-10T20:24:16.721470Z",
- "breadcrumbs": [],
- "transaction": "/post-error/",
- "contexts": {
- "trace": {
- "trace_id": "ac1605c393434f16834cffc98eb81240",
- "span_id": "8c46c105c38431d3",
- "parent_span_id": "8b01678e63255c9c",
- "op": "django.middleware",
- "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
- },
- "runtime": {
- "name": "CPython",
- "version": "3.8.1",
- "build": "3.8.1 (default, Jan 3 2020, 22:55:55) \n[GCC 8.3.0]",
- },
- },
- "modules": {
- "wheel": "0.33.6",
- "webencodings": "0.5.1",
- "wcwidth": "0.1.8",
- "urllib3": "1.25.7",
- "typed-ast": "1.4.0",
- "traitlets": "4.3.3",
- "tomlkit": "0.5.8",
- "toml": "0.10.0",
- "sqlparse": "0.3.0",
- "six": "1.13.0",
- "shellingham": "1.3.1",
- "setuptools": "44.0.0",
- "sentry-sdk": "0.14.0",
- "secretstorage": "3.1.1",
- "requests": "2.22.0",
- "requests-toolbelt": "0.8.0",
- "regex": "2020.1.8",
- "pytz": "2019.3",
- "pyrsistent": "0.14.11",
- "pyparsing": "2.4.6",
- "pylev": "1.3.0",
- "pygments": "2.5.2",
- "pycparser": "2.19",
- "ptyprocess": "0.6.0",
- "prompt-toolkit": "3.0.2",
- "poetry": "1.0.0",
- "pkginfo": "1.5.0.1",
- "pip": "19.3.1",
- "pickleshare": "0.7.5",
- "pexpect": "4.7.0",
- "pathspec": "0.7.0",
- "pastel": "0.1.1",
- "parso": "0.5.2",
- "msgpack": "0.6.2",
- "lockfile": "0.12.2",
- "keyring": "19.3.0",
- "jsonschema": "3.2.0",
- "jeepney": "0.4.2",
- "jedi": "0.15.2",
- "ipython": "7.11.1",
- "ipython-genutils": "0.2.0",
- "ipdb": "0.12.3",
- "idna": "2.8",
- "html5lib": "1.0.1",
- "django": "3.0.2",
- "decorator": "4.4.1",
- "cryptography": "2.8",
- "clikit": "0.4.1",
- "click": "7.0",
- "cleo": "0.7.6",
- "chardet": "3.0.4",
- "cffi": "1.13.2",
- "certifi": "2019.11.28",
- "cachy": "0.3.0",
- "cachecontrol": "0.12.6",
- "black": "19.10b0",
- "backcall": "0.1.0",
- "attrs": "19.3.0",
- "asgiref": "3.2.3",
- "appdirs": "1.4.3",
- },
- "extra": {"sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"]},
- "request": {
- "url": "http://localhost:8001/post-error/",
- "query_string": "",
- "method": "POST",
- "env": {"SERVER_NAME": "210ecca56d59", "SERVER_PORT": "8001"},
- "headers": {
- "Content-Length": "95",
- "Content-Type": "application/x-www-form-urlencoded",
- "Host": "localhost:8001",
- "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Accept-Language": "en-US,en;q=0.5",
- "Accept-Encoding": "gzip, deflate",
- "Origin": "http://localhost:8001",
- "Connection": "keep-alive",
- "Referer": "http://localhost:8001/",
- "Cookie": "",
- "Upgrade-Insecure-Requests": "1",
- "Dnt": "1",
- },
- "data": {
- "csrfmiddlewaretoken": "G1Cfr5bnrZz4ICfiDwPdGMY865fvWB1RN1RZD2vJCYxaEJsQfFX1QUdlKEwNfELr",
- "param1": "val",
- },
- },
- "server_name": "210ecca56d59",
- "sdk": {
- "name": "sentry.python",
- "version": "0.14.0",
- "packages": [{"name": "pypi:sentry-sdk", "version": "0.14.0"}],
- "integrations": [
- "argv",
- "atexit",
- "dedupe",
- "django",
- "excepthook",
- "logging",
- "modules",
- "stdlib",
- "threading",
- ],
- },
- "platform": "python",
- "_meta": {
- "request": {"headers": {"Cookie": {"": {"rem": [["!config", "x", 0, 315]]}}}}
- },
- }
- database_stack_error = {
- "level": "error",
- "exception": {
- "values": [
- {
- "module": "django.contrib.auth.models",
- "type": "User.DoesNotExist",
- "value": "User matching query does not exist.",
- "mechanism": {"type": "django", "handled": False},
- "stacktrace": {
- "frames": [
- {
- "filename": "django/core/handlers/exception.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py",
- "function": "inner",
- "module": "django.core.handlers.exception",
- "lineno": 34,
- "pre_context": [
- " can rely on getting a response instead of an exception.",
- ' """',
- " @wraps(get_response)",
- " def inner(request):",
- " try:",
- ],
- "context_line": " response = get_response(request)",
- "post_context": [
- " except Exception as exc:",
- " response = response_for_exception(request, exc)",
- " return response",
- " return inner",
- "",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "exc": "DoesNotExist('User matching query does not exist.')",
- "get_response": "<bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 115,
- "pre_context": [
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- " except Exception as e:",
- ],
- "context_line": " response = self.process_exception_by_middleware(e, request)",
- "post_context": [
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- " if isinstance(callback, types.FunctionType): # FBV",
- " view_name = callback.__name__",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DatabaseStackErrorView, args=(), kwargs={}, url_name=database_stack_error, app_names=[], namespaces=[], route=database-stack-error/)",
- "callback": "<function DatabaseStackErrorView at 0x7f62d403d310>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DatabaseStackErrorView at 0x7f62d403d310>",
- },
- "in_app": True,
- },
- {
- "filename": "django/core/handlers/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py",
- "function": "_get_response",
- "module": "django.core.handlers.base",
- "lineno": 113,
- "pre_context": [
- " break",
- "",
- " if response is None:",
- " wrapped_callback = self.make_view_atomic(callback)",
- " try:",
- ],
- "context_line": " response = wrapped_callback(request, *callback_args, **callback_kwargs)",
- "post_context": [
- " except Exception as e:",
- " response = self.process_exception_by_middleware(e, request)",
- "",
- " # Complain if the view returned None (a common error).",
- " if response is None:",
- ],
- "vars": {
- "self": "<django.core.handlers.wsgi.WSGIHandler object at 0x7f62d45864f0>",
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "response": "None",
- "resolver": "<URLResolver 'django_error_factory.urls' (None:None) '^/'>",
- "resolver_match": "ResolverMatch(func=errors.views.DatabaseStackErrorView, args=(), kwargs={}, url_name=database_stack_error, app_names=[], namespaces=[], route=database-stack-error/)",
- "callback": "<function DatabaseStackErrorView at 0x7f62d403d310>",
- "callback_args": [],
- "callback_kwargs": {},
- "middleware_method": "<function CsrfViewMiddleware.process_view at 0x7f62d3710040>",
- "wrapped_callback": "<function DatabaseStackErrorView at 0x7f62d403d310>",
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "view",
- "module": "django.views.generic.base",
- "lineno": 71,
- "pre_context": [
- " if not hasattr(self, 'request'):",
- " raise AttributeError(",
- " \"%s instance has no 'request' attribute. Did you override \"",
- ' "setup() and forget to call super()?" % cls.__name__',
- " )",
- ],
- "context_line": " return self.dispatch(request, *args, **kwargs)",
- "post_context": [
- " view.view_class = cls",
- " view.view_initkwargs = initkwargs",
- "",
- " # take name and docstring from class",
- " update_wrapper(view, cls, updated=())",
- ],
- "vars": {
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "args": [],
- "kwargs": {},
- "self": "<errors.views.DatabaseStackErrorView object at 0x7f62d2221d60>",
- "cls": "<class 'errors.views.DatabaseStackErrorView'>",
- "initkwargs": {},
- },
- "in_app": True,
- },
- {
- "filename": "django/views/generic/base.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py",
- "function": "dispatch",
- "module": "django.views.generic.base",
- "lineno": 97,
- "pre_context": [
- " # request method isn't on the approved list.",
- " if request.method.lower() in self.http_method_names:",
- " handler = getattr(self, request.method.lower(), self.http_method_not_allowed)",
- " else:",
- " handler = self.http_method_not_allowed",
- ],
- "context_line": " return handler(request, *args, **kwargs)",
- "post_context": [
- "",
- " def http_method_not_allowed(self, request, *args, **kwargs):",
- " logger.warning(",
- " 'Method Not Allowed (%s): %s', request.method, request.path,",
- " extra={'status_code': 405, 'request': request}",
- ],
- "vars": {
- "self": "<errors.views.DatabaseStackErrorView object at 0x7f62d2221d60>",
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "args": [],
- "kwargs": {},
- "handler": "<bound method DatabaseStackErrorView.get of <errors.views.DatabaseStackErrorView object at 0x7f62d2221d60>>",
- },
- "in_app": True,
- },
- {
- "filename": "errors/views.py",
- "abs_path": "/code/errors/views.py",
- "function": "get",
- "module": "errors.views",
- "lineno": 28,
- "pre_context": [
- "",
- "",
- "class DatabaseStackErrorView(View):",
- " def get(self, request, *args, **kwargs):",
- " users = User.objects.all()",
- ],
- "context_line": " self.make_error(users)",
- "post_context": [
- "",
- " def make_error(self, users):",
- " User.objects.get(id=users.count() + 10000)",
- "",
- "",
- ],
- "vars": {
- "self": "<errors.views.DatabaseStackErrorView object at 0x7f62d2221d60>",
- "request": "<WSGIRequest: GET '/database-stack-error/'>",
- "args": [],
- "kwargs": {},
- "users": "<QuerySet from django.db.models.query at 0x7f62d2221d00>",
- },
- "in_app": True,
- },
- {
- "filename": "errors/views.py",
- "abs_path": "/code/errors/views.py",
- "function": "make_error",
- "module": "errors.views",
- "lineno": 31,
- "pre_context": [
- " def get(self, request, *args, **kwargs):",
- " users = User.objects.all()",
- " self.make_error(users)",
- "",
- " def make_error(self, users):",
- ],
- "context_line": " User.objects.get(id=users.count() + 10000)",
- "post_context": [
- "",
- "",
- "class TemplateErrorView(TemplateView):",
- ' template_name = "template_error.html"',
- "",
- ],
- "vars": {
- "self": "<errors.views.DatabaseStackErrorView object at 0x7f62d2221d60>",
- "users": "<QuerySet from django.db.models.query at 0x7f62d2221d00>",
- },
- "in_app": True,
- },
- {
- "filename": "django/db/models/manager.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/db/models/manager.py",
- "function": "manager_method",
- "module": "django.db.models.manager",
- "lineno": 82,
- "pre_context": [
- "",
- " @classmethod",
- " def _get_queryset_methods(cls, queryset_class):",
- " def create_method(name, method):",
- " def manager_method(self, *args, **kwargs):",
- ],
- "context_line": " return getattr(self.get_queryset(), name)(*args, **kwargs)",
- "post_context": [
- " manager_method.__name__ = method.__name__",
- " manager_method.__doc__ = method.__doc__",
- " return manager_method",
- "",
- " new_methods = {}",
- ],
- "vars": {
- "self": "<django.contrib.auth.models.UserManager object at 0x7f62d410be20>",
- "args": [],
- "kwargs": {"id": "10000"},
- "name": "'get'",
- },
- "in_app": True,
- },
- {
- "filename": "django/db/models/query.py",
- "abs_path": "/usr/local/lib/python3.8/site-packages/django/db/models/query.py",
- "function": "get",
- "module": "django.db.models.query",
- "lineno": 415,
- "pre_context": [
- " clone.query.set_limits(high=limit)",
- " num = len(clone)",
- " if num == 1:",
- " return clone._result_cache[0]",
- " if not num:",
- ],
- "context_line": " raise self.model.DoesNotExist(",
- "post_context": [
- ' "%s matching query does not exist." %',
- " self.model._meta.object_name",
- " )",
- " raise self.model.MultipleObjectsReturned(",
- " 'get() returned more than one %s -- it returned %s!' % (",
- ],
- "vars": {
- "self": "<QuerySet from django.db.models.query at 0x7f62d2221e20>",
- "args": [],
- "kwargs": {"id": "10000"},
- "clone": "<QuerySet from django.db.models.query at 0x7f62d3656c70>",
- "limit": "21",
- "num": "0",
- },
- "in_app": True,
- },
- ]
- },
- }
- ]
- },
- "event_id": "5cdb58a7463f4cd8b7c57d3372fb5ae9",
- "timestamp": "2020-01-10T20:24:52.681701Z",
- "breadcrumbs": [
- {
- "message": 'SELECT COUNT(*) AS "__count" FROM "auth_user"',
- "category": "query",
- "data": {},
- "timestamp": "2020-01-10T20:24:52.674131Z",
- "type": "default",
- },
- {
- "message": 'SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = %s LIMIT 21',
- "category": "query",
- "data": {},
- "timestamp": "2020-01-10T20:24:52.677030Z",
- "type": "default",
- },
- ],
- "transaction": "/database-stack-error/",
- "contexts": {
- "trace": {
- "trace_id": "8d5aef32be9f475baded433af937cd3a",
- "span_id": "a6d8e8401c38eb7e",
- "parent_span_id": "aa5ecbdf2bf83338",
- "op": "django.middleware",
- "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
- },
- "runtime": {
- "name": "CPython",
- "version": "3.8.1",
- "build": "3.8.1 (default, Jan 3 2020, 22:55:55) \n[GCC 8.3.0]",
- },
- },
- "modules": {
- "wheel": "0.33.6",
- "webencodings": "0.5.1",
- "wcwidth": "0.1.8",
- "urllib3": "1.25.7",
- "typed-ast": "1.4.0",
- "traitlets": "4.3.3",
- "tomlkit": "0.5.8",
- "toml": "0.10.0",
- "sqlparse": "0.3.0",
- "six": "1.13.0",
- "shellingham": "1.3.1",
- "setuptools": "44.0.0",
- "sentry-sdk": "0.14.0",
- "secretstorage": "3.1.1",
- "requests": "2.22.0",
- "requests-toolbelt": "0.8.0",
- "regex": "2020.1.8",
- "pytz": "2019.3",
- "pyrsistent": "0.14.11",
- "pyparsing": "2.4.6",
- "pylev": "1.3.0",
- "pygments": "2.5.2",
- "pycparser": "2.19",
- "ptyprocess": "0.6.0",
- "prompt-toolkit": "3.0.2",
- "poetry": "1.0.0",
- "pkginfo": "1.5.0.1",
- "pip": "19.3.1",
- "pickleshare": "0.7.5",
- "pexpect": "4.7.0",
- "pathspec": "0.7.0",
- "pastel": "0.1.1",
- "parso": "0.5.2",
- "msgpack": "0.6.2",
- "lockfile": "0.12.2",
- "keyring": "19.3.0",
- "jsonschema": "3.2.0",
- "jeepney": "0.4.2",
- "jedi": "0.15.2",
- "ipython": "7.11.1",
- "ipython-genutils": "0.2.0",
- "ipdb": "0.12.3",
- "idna": "2.8",
- "html5lib": "1.0.1",
- "django": "3.0.2",
- "decorator": "4.4.1",
- "cryptography": "2.8",
- "clikit": "0.4.1",
- "click": "7.0",
- "cleo": "0.7.6",
- "chardet": "3.0.4",
- "cffi": "1.13.2",
- "certifi": "2019.11.28",
- "cachy": "0.3.0",
- "cachecontrol": "0.12.6",
- "black": "19.10b0",
- "backcall": "0.1.0",
- "attrs": "19.3.0",
- "asgiref": "3.2.3",
- "appdirs": "1.4.3",
- },
- "extra": {"sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"]},
- "request": {
- "url": "http://localhost:8001/database-stack-error/",
- "query_string": "",
- "method": "GET",
- "env": {"SERVER_NAME": "210ecca56d59", "SERVER_PORT": "8001"},
- "headers": {
- "Content-Length": "",
- "Content-Type": "text/plain",
- "Host": "localhost:8001",
- "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Accept-Language": "en-US,en;q=0.5",
- "Accept-Encoding": "gzip, deflate",
- "Connection": "keep-alive",
- "Referer": "http://localhost:8001/",
- "Cookie": "",
- "Upgrade-Insecure-Requests": "1",
- "Dnt": "1",
- },
- },
- "server_name": "210ecca56d59",
- "sdk": {
- "name": "sentry.python",
- "version": "0.14.0",
- "packages": [{"name": "pypi:sentry-sdk", "version": "0.14.0"}],
- "integrations": [
- "argv",
- "atexit",
- "dedupe",
- "django",
- "excepthook",
- "logging",
- "modules",
- "stdlib",
- "threading",
- ],
- },
- "platform": "python",
- "_meta": {
- "request": {"headers": {"Cookie": {"": {"rem": [["!config", "x", 0, 315]]}}}}
- },
- }
- message = {
- "message": "Page not found!",
- "level": "info",
- "event_id": "a5c440e008bd4384b7a905572aea46b5",
- "timestamp": "2020-03-08T16:16:31.703477Z",
- "breadcrumbs": [],
- "transaction": "/message/",
- "contexts": {
- "trace": {
- "trace_id": "5df0789e0e1843efb71d0cab07d71a15",
- "span_id": "ab2451dbd2b9e97e",
- "parent_span_id": "b77c0e1230fd1252",
- "op": "django.middleware",
- "description": "django.middleware.clickjacking.XFrameOptionsMiddleware.__call__",
- },
- "runtime": {
- "name": "CPython",
- "version": "3.8.2",
- "build": "3.8.2 (default, Feb 26 2020, 15:09:34) \n[GCC 8.3.0]",
- },
- },
- "modules": {
- "wheel": "0.34.2",
- "webencodings": "0.5.1",
- "wcwidth": "0.1.8",
- "urllib3": "1.25.8",
- "typed-ast": "1.4.1",
- "traitlets": "4.3.3",
- "tomlkit": "0.5.11",
- "toml": "0.10.0",
- "sqlparse": "0.3.1",
- "six": "1.14.0",
- "shellingham": "1.3.2",
- "setuptools": "45.2.0",
- "sentry-sdk": "0.14.2",
- "secretstorage": "3.1.2",
- "requests": "2.23.0",
- "requests-toolbelt": "0.8.0",
- "regex": "2020.2.20",
- "pytz": "2019.3",
- "pyrsistent": "0.14.11",
- "pyparsing": "2.4.6",
- "pylev": "1.3.0",
- "pygments": "2.6.1",
- "pycparser": "2.20",
- "ptyprocess": "0.6.0",
- "prompt-toolkit": "3.0.3",
- "poetry": "1.0.0",
- "pkginfo": "1.5.0.1",
- "pip": "20.0.2",
- "pickleshare": "0.7.5",
- "pexpect": "4.8.0",
- "pathspec": "0.7.0",
- "pastel": "0.2.0",
- "parso": "0.6.2",
- "msgpack": "1.0.0",
- "lockfile": "0.12.2",
- "keyring": "19.3.0",
- "jsonschema": "3.2.0",
- "jeepney": "0.4.3",
- "jedi": "0.16.0",
- "ipython": "7.13.0",
- "ipython-genutils": "0.2.0",
- "ipdb": "0.12.3",
- "idna": "2.9",
- "html5lib": "1.0.1",
- "django": "3.0.4",
- "decorator": "4.4.2",
- "cryptography": "2.8",
- "clikit": "0.4.2",
- "click": "7.0",
- "cleo": "0.7.6",
- "chardet": "3.0.4",
- "cffi": "1.14.0",
- "certifi": "2019.11.28",
- "cachy": "0.3.0",
- "cachecontrol": "0.12.6",
- "black": "19.10b0",
- "backcall": "0.1.0",
- "attrs": "19.3.0",
- "asgiref": "3.2.3",
- "appdirs": "1.4.3",
- },
- "extra": {"sys.argv": ["./manage.py", "runserver", "0.0.0.0:8001"]},
- "request": {
- "url": "http://localhost:8001/message/",
- "query_string": "",
- "method": "GET",
- "env": {"SERVER_NAME": "6dbd4da42f28", "SERVER_PORT": "8001"},
- "headers": {
- "Content-Length": "",
- "Content-Type": "text/plain",
- "Host": "localhost:8001",
- "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0",
- "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
- "Accept-Language": "en-US,en;q=0.5",
- "Accept-Encoding": "gzip, deflate",
- "Referer": "http://localhost:8001/",
- "Connection": "keep-alive",
- "Cookie": "",
- "Upgrade-Insecure-Requests": "1",
- "Dnt": "1",
- "Cache-Control": "max-age=0",
- },
- },
- "server_name": "6dbd4da42f28",
- "sdk": {
- "name": "sentry.python",
- "version": "0.14.2",
- "packages": [{"name": "pypi:sentry-sdk", "version": "0.14.2"}],
- "integrations": [
- "argv",
- "atexit",
- "dedupe",
- "django",
- "excepthook",
- "logging",
- "modules",
- "stdlib",
- "threading",
- ],
- },
- "platform": "python",
- "_meta": {
- "request": {"headers": {"Cookie": {"": {"rem": [["!config", "x", 0, 324]]}}}}
- },
- }
- all_django_events = [
- divide_zero,
- database_error,
- post_error,
- database_stack_error,
- message,
- ]
|