@MrAndy

Как решить ошибку при входе через twitch с помощью django-allauth?

Ошибка:
TypeError at /accounts/twitch/login/callback/

new_user() takes 2 positional arguments but 3 were given


Environment:

Request Method: GET
Request URL: localhost:8000/accounts/twitch/login/callback/?cod...

Django Version: 2.2.4
Python Version: 3.7.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'crispy_forms',
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.twitch',
'allauth.socialaccount.providers.google',
'rest_framework',
'donationalerts.users.apps.UsersConfig',
'debug_toolbar',
'django_extensions']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']

Traceback:

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\django\core\handlers\exception.py" in inner
34. response = get_response(request)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\django\core\handlers\base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\django\core\handlers\base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\andre\AppData\Local\Programs\Python\Python37\lib\contextlib.py" in inner
74. return func(*args, **kwds)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\allauth\socialaccount\providers\oauth2\views.py" in view
73. return self.dispatch(request, *args, **kwargs)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\allauth\socialaccount\providers\oauth2\views.py" in dispatch
134. response=access_token)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\allauth\socialaccount\providers\twitch\views.py" in complete_login
32. return self.get_provider().sociallogin_from_response(request, data)

File "C:\Users\andre\PycharmProjects\donationalerts\venv\lib\site-packages\allauth\socialaccount\providers\base.py" in sociallogin_from_response
97. user = sociallogin.user = adapter.new_user(request, sociallogin)

Exception Type: TypeError at /accounts/twitch/login/callback/
Exception Value: new_user() takes 2 positional arguments but 3 were given
  • Вопрос задан
  • 49 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы