Opened 6 years ago

Last modified 6 years ago

#29803 closed Bug

Django throws 500, when running development server and json request is missing trailing / — at Initial Version

Reported by: Paul Zeinlinger Owned by: nobody
Component: Core (Management commands) Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Discovered today after switching to python:3.7 base image from python:3.7-alpine. When sending an application/json request to a correct URL with a missing trailing slash, I get a 500 back.
Traceback:
django_1 | Traceback (most recent call last):
django_1 | File "/usr/local/lib/python3.7/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call
django_1 | return self.application(environ, start_response)
django_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/wsgi.py", line 142, in call
django_1 | response = self.get_response(request)
django_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 78, in get_response
django_1 | response = self._middleware_chain(request)
django_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 36, in inner
django_1 | response = response_for_exception(request, exc)
django_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception
django_1 | response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
django_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception
django_1 | return debug.technical_500_response(request, *exc_info)
django_1 | File "/usr/local/lib/python3.7/site-packages/django_extensions/management/technical_response.py", line 31, in null_technical_500_response
django_1 | elif tld.wsgi_tb:
django_1 | AttributeError: '_thread._local' object has no attribute 'wsgi_tb'

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top