unexpected keyword argument 'current_app' #367

Closed
opened 2025-12-29 16:21:23 +01:00 by adam · 3 comments
Owner

Originally created by @rowco on GitHub (Aug 16, 2016).

Hi,

Installing for the first time - followed all instructions, but hitting this error. I can load the /admin page fine, but the / page triggers this error:

Traceback (most recent call last):
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in call
return self.application(environ, start_response)
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 86, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception
return callback(request, **param_dict)
File "/usr/local/projects/netbox/netbox/netbox/views.py", line 62, in handle_500
}, status=500)
File "/usr/lib/python2.7/site-packages/django/shortcuts/init.py", line 49, in render
context_instance = RequestContext(request, current_app=current_app)
TypeError: init() got an unexpected keyword argument 'current_app'
`

Originally created by @rowco on GitHub (Aug 16, 2016). Hi, Installing for the first time - followed all instructions, but hitting this error. I can load the /admin page fine, but the / page triggers this error: Traceback (most recent call last): File "/usr/lib64/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in **call** return self.application(environ, start_response) 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 86, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 135, in handle_uncaught_exception return callback(request, **param_dict) File "/usr/local/projects/netbox/netbox/netbox/views.py", line 62, in handle_500 }, status=500) File "/usr/lib/python2.7/site-packages/django/shortcuts/__init__.py", line 49, in render context_instance = RequestContext(request, current_app=current_app) TypeError: **init**() got an unexpected keyword argument 'current_app' `
adam closed this issue 2025-12-29 16:21:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 16, 2016):

Please try re-installing NetBox. It seems that you've installed it in a location different from the location given in the docs. This should be fine, but make sure you replace all instance of /opt/netbox with /usr/local/projects/netbox in your case.

@jeremystretch commented on GitHub (Aug 16, 2016): Please try re-installing NetBox. It seems that you've installed it in a location different from the location given in the docs. This should be fine, but make sure you replace all instance of `/opt/netbox` with `/usr/local/projects/netbox` in your case.
Author
Owner

@rowco commented on GitHub (Aug 16, 2016):

Hiya - thanks for the quick response. I've relocated the install to '/opt/netbox' and I'm getting the same exception.

@rowco commented on GitHub (Aug 16, 2016): Hiya - thanks for the quick response. I've relocated the install to '/opt/netbox' and I'm getting the same exception.
Author
Owner

@rowco commented on GitHub (Aug 17, 2016):

I think I have the remnants of an old version of django on the system, a clear out and reinstall has got it all working. Thanks for your assistance.

@rowco commented on GitHub (Aug 17, 2016): I think I have the remnants of an old version of django on the system, a clear out and reinstall has got it all working. Thanks for your assistance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#367