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

Hai KeyError at /login 'default' #159

Closed
chenguanyou opened this issue Mar 12, 2018 · 2 comments
Closed

Hai KeyError at /login 'default' #159

chenguanyou opened this issue Mar 12, 2018 · 2 comments

Comments

@chenguanyou
Copy link

Internal Server Error: /login
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/contrib/auth/views.py", line 54, in inner
return func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/contrib/auth/views.py", line 150, in login
)(request)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 67, in _wrapper
return bound_func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 67, in _wrapper
return bound_func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 67, in _wrapper
return bound_func(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/utils/decorators.py", line 63, in bound_func
return func.get(self, type(self))(*args2, **kwargs2)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/contrib/auth/views.py", line 90, in dispatch
return super(LoginView, self).dispatch(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/views/generic/base.py", line 88, in dispatch
return handler(request, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/views/generic/edit.py", line 183, in post
return self.form_valid(form)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/contrib/auth/views.py", line 119, in form_valid
auth_login(self.request, form.get_user())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/contrib/auth/init.py", line 160, in login
user_logged_in.send(sender=user.class, request=request, user=user)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/dispatch/dispatcher.py", line 193, in send
for receiver in self._live_receivers(sender)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/Django-1.11.7-py3.6.egg/django/dispatch/dispatcher.py", line 193, in
for receiver in self._live_receivers(sender)
File "/Users/zhunishengrikuaile/Downloads/bootcamp-master/bootcamp/authentication/models.py", line 206, in on_user_login
Profile.objects.get(user=kwargs['user']).notify_login()
File "/Users/zhunishengrikuaile/Downloads/bootcamp-master/bootcamp/authentication/models.py", line 157, in notify_login
self.group_notification('log in')
File "/Users/zhunishengrikuaile/Downloads/bootcamp-master/bootcamp/authentication/models.py", line 187, in group_notification
Group('notifications').send({
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/channels/channel.py", line 65, in init
self.channel_layer = channel_layers[alias]
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/channels/asgi.py", line 70, in getitem
self.backends[key] = self.make_backend(key)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/channels/asgi.py", line 32, in make_backend
config = self.configs[name].get("CONFIG", {})
KeyError: 'default'
How to solve it。

@sebastian-code
Copy link
Collaborator

I'm unable to identify with precision the issue in the error log, it appears to be something related with a constant in the settings file, I guess it is related to the REDIS configuration.

@chenguanyou
Copy link
Author

It's been settled. Thank you very much.

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

2 participants