Opened 6 years ago

Closed 6 years ago

#29803 closed Bug (invalid)

Django throws 500, when running development server and json request is missing trailing /

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 (last modified by Tim Graham)

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 (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/contrib/staticfiles/", line 65, in __call__
    return self.application(environ, start_response)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/", line 142, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/", line 78, in get_response
    response = self._middleware_chain(request)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/", line 36, in inner
    response = response_for_exception(request, exc)
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/", line 90, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/usr/local/lib/python3.7/site-packages/django/core/handlers/", line 125, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/local/lib/python3.7/site-packages/django_extensions/management/", line 31, in null_technical_500_response
    elif tld.wsgi_tb:
AttributeError: '_thread._local' object has no attribute 'wsgi_tb'

Change History (1)

comment:1 by Tim Graham, 6 years ago

Description: modified (diff)
Resolution: invalid
Status: newclosed

The crash is in django_extensions/management/ which is third party package.

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