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

ValueError: too many values to unpack (expected 2) After use customized User model #19

Closed
elcolie opened this issue Jun 7, 2019 · 1 comment

Comments

@elcolie
Copy link

elcolie commented Jun 7, 2019

This might be an easy question, but for me this is first time to customize the User model. And I have followed #3 I think customized the User model is mandatory by now. Then please support on best practice on this issue.

"GET /cognito HTTP/1.1" 301 0
Internal Server Error: /cognito/
Traceback (most recent call last):
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/views.py", line 495, in dispatch
    response = self.handle_exception(exc)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/views.py", line 455, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/views.py", line 483, in dispatch
    self.initial(request, *args, **kwargs)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/views.py", line 400, in initial
    self.perform_authentication(request)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/views.py", line 326, in perform_authentication
    request.user
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/request.py", line 223, in user
    self._authenticate()
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/rest_framework/request.py", line 376, in _authenticate
    user_auth_tuple = authenticator.authenticate(self)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django_cognito_jwt/backend.py", line 31, in authenticate
    USER_MODEL = self.get_user_model()
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django_cognito_jwt/backend.py", line 37, in get_user_model
    return django_apps.get_model(user_model, require_ready=False)
  File "/Users/sarit/.pyenv/versions/ht6m/lib/python3.6/site-packages/django/apps/registry.py", line 203, in get_model
    app_label, model_name = app_label.split('.')
ValueError: too many values to unpack (expected 2)
@elcolie
Copy link
Author

elcolie commented Jun 7, 2019

I have to startapp with new MyUser model

@elcolie elcolie closed this as completed Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant