I've got AttributeError at /complete/facebook/ just before redirecting newly registered user to LOGIN_REDIRECT_URL: Exception Value: 'str' object has no attribute 'update'
- Request Method: GET
- Request URL: http://appdomain/complete/facebook/?redirect_state=~&code=~&state=~
- Django Version: 1.9
- Python Version: 2.7.6
- Installed Applications:
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'django.contrib.gis',
- 'social.apps.django_app.default',
- 'myapp'
- Installed Middleware:
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- 'django.middleware.security.SecurityMiddleware']
Traceback:
File ".../social/pipeline/social_auth.py" in load_extra_data
92. social.set_extra_data(extra_data)
File ".../social/storage/django_orm.py" in set_extra_data
16. if super(DjangoUserMixin, self).set_extra_data(extra_data)
File ".../social/storage/base.py" in set_extra_data
85. self.extra_data.update(extra_data)
User and related social auth was created correctly, except extra_data field of UserSocialAuth model (it was empty JSON string). Every next attempt was completed without any errors, updating extra_data field with facebook related data in JSON format.
Error appears again if User and related UserSocialAuth models are removed. Seems like set_extra_data function assumes self.extra_data to be dict, but str given for new users.
My app is default django project appended using PSA documentation guides.
I've got AttributeError at
/complete/facebook/just before redirecting newly registered user toLOGIN_REDIRECT_URL: Exception Value: 'str' object has no attribute 'update'Traceback:
File ".../social/pipeline/social_auth.py" in load_extra_data
92. social.set_extra_data(extra_data)File ".../social/storage/django_orm.py" in set_extra_data
16. if super(DjangoUserMixin, self).set_extra_data(extra_data)File ".../social/storage/base.py" in set_extra_data
85. self.extra_data.update(extra_data)User and related social auth was created correctly, except
extra_datafield ofUserSocialAuthmodel (it was empty JSON string). Every next attempt was completed without any errors, updatingextra_datafield with facebook related data in JSON format.Error appears again if User and related UserSocialAuth models are removed. Seems like
set_extra_datafunction assumesself.extra_datato be dict, but str given for new users.My app is default django project appended using PSA documentation guides.