Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null_technical_500_response() got an unexpected keyword argument 'status_code' #68

Open
ghost opened this issue Nov 29, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 29, 2016

Django: 1.10
Python: 2.7.9

After migrating and launching development server by ./manage.py runserver 0.0.0.0:8002 then visiting the page I receive this:

Traceback (most recent call last):
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 76, in response_for_exception
    response = debug.technical_500_response(request, *sys.exc_info(), status_code=400)
TypeError: null_technical_500_response() got an unexpected keyword argument 'status_code'

Changed MIDDLEWARE_CLASSES to MIDDLEWARE in base.py, and added

MIDDLEWARE += [
    'debug_toolbar.middleware.DebugToolbarMiddleware',
]

to development.py file

and now I'm receiving:

Traceback (most recent call last):
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
    response = self._middleware_chain(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 86, in response_for_exception
    response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 128, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/home/rafal/csgopanel/src/csgopanel/wsgi.py", line 24, in null_technical_500_response
    six.reraise(exc_type, exc_value, tb)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 39, in inner
    response = get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/utils/deprecation.py", line 136, in __call__
    response = self.get_response(request)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = response_for_exception(request, exc)
  File "/home/rafal/.env/csgopanel/lib/python2.7/site-packages/django/core/handlers/exception.py", line 76, in response_for_exception
    response = debug.technical_500_response(request, *sys.exc_info(), status_code=400)
TypeError: null_technical_500_response() got an unexpected keyword argument 'status_code'
@arocks
Copy link
Owner

arocks commented Dec 7, 2016

Hi @rafalolszewskii ,

This is possibly due to issue #67 . This has been fixed in master. Please see my comments to that issue.

Thanks,
Arun

@pnhegde
Copy link

pnhegde commented Mar 20, 2017

@arocks I'm still facing this issue with Python 3.5.2 .

@chansonZ
Copy link

chansonZ commented May 4, 2017

tks, still:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in call
response = self.get_response(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 124, in get_response
response = self._middleware_chain(request)
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response = response_for_exception(request, exc)
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 76, in response_for_exception
response = debug.technical_500_response(request, *sys.exc_info(), status_code=400)
TypeError: null_technical_500_response() got an unexpected keyword argument 'status_code'

@Drunkar
Copy link

Drunkar commented Aug 25, 2017

I faced the same problem and found a solution!
ALLOWED_HOSTS seems to be necessary even if it's a debug mode.

I added below line to settings/development.py. Then debugging toolbar appeared! :)

ALLOWED_HOSTS = ["*"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants