Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8284409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:05:41+00:00 2026-06-08T11:05:41+00:00

When I’m trying to login by OpenID with social_auth , I get an error:

  • 0

When I’m trying to login by OpenID with social_auth, I get an error:
Table ‘django_db.social_auth_association’ doesn’t exist.

I had to call syncdb, but it didn’t create any table for social_auth.

Why syncdb doesn’t use social_auth’s models?

Here is my log:

Environment:


Request Method: GET
Request URL: http://localhost:8000/login/yandex/

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_ipgeobase',
 'myproject.main',
 'social_auth',
 'openid')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File ".../django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File ".../myproject/social_auth/decorators.py" in wrapper
  37.                 return func(request, backend, *args, **kwargs)
File ".../myproject/social_auth/views.py" in auth
  27.     return auth_process(request, backend)
File ".../myproject/social_auth/views.py" in auth_process
  85.     if backend.uses_redirect:
File ".../myproject/social_auth/backends/__init__.py" in uses_redirect
  504.         return self.openid_request().shouldSendRedirect()
File ".../myproject/social_auth/backends/__init__.py" in openid_request
  510.                                                             extra_params))
File ".../myproject/openid/consumer/consumer.py" in begin
  353.             return self.beginWithoutDiscovery(service, anonymous)
File ".../myproject/openid/consumer/consumer.py" in beginWithoutDiscovery
  376.         auth_req = self.consumer.begin(service)
File ".../myproject/openid/consumer/consumer.py" in begin
  598.             assoc = self._getAssociation(service_endpoint)
File ".../myproject/openid/consumer/consumer.py" in _getAssociation
  1158.         assoc = self.store.getAssociation(endpoint.server_url)
File ".../myproject/social_auth/store.py" in getAssociation
  24.                                                                handle)
File ".../myproject/social_auth/db/base.py" in get_oid_associations
  135.                 for assoc in Association.objects.filter(**args)
File ".../django/db/models/query.py" in _result_iter
  118.                 self._fill_cache()
File ".../django/db/models/query.py" in _fill_cache
  875.                     self._result_cache.append(self._iter.next())
File ".../django/db/models/query.py" in iterator
  291.         for row in compiler.results_iter():
File ".../django/db/models/sql/compiler.py" in results_iter
  763.         for rows in self.execute_sql(MULTI):
File ".../django/db/models/sql/compiler.py" in execute_sql
  818.         cursor.execute(sql, params)
File ".../django/db/backends/util.py" in execute
  40.             return self.cursor.execute(sql, params)
File ".../django/db/backends/mysql/base.py" in execute
  114.             return self.cursor.execute(query, args)
File ".../MySQLdb/cursors.py" in execute
  174.             self.errorhandler(self, exc, value)
File ".../MySQLdb/connections.py" in defaulterrorhandler
  36.     raise errorclass, errorvalue

Exception Type: DatabaseError at /login/yandex/
Exception Value: (1146, "Table 'django_db.social_auth_association' doesn't exist")

Here is my settings.py:

import os

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'django_db',                      # Or path to database file if using sqlite3.
        'USER': 'root',                      # Not used with sqlite3.
        'PASSWORD': '1',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}

DEFAULT_CHARSET = 'utf-8'

TIME_ZONE = 'Europe/Moscow'

LANGUAGE_CODE = 'en-us'

SITE_ID = 1

USE_I18N = True
USE_L10N = True

USE_TZ = True

MEDIA_ROOT = os.path.join(os.path.dirname(__file__), "media") 
MEDIA_URL = '/media/' 

STATIC_ROOT = ''
STATIC_URL = '/static/'

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'django.contrib.messages.context_processors.messages',
    'social_auth.context_processors.social_auth_by_type_backends',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'myproject.urls'

WSGI_APPLICATION = 'myproject.wsgi.application'

TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_ipgeobase',
    'myproject.main',
    'social_auth',
    'openid',
)

AUTHENTICATION_BACKENDS = (
    'social_auth.backends.contrib.vkontakte.VKontakteBackend',
    'social_auth.backends.OpenIDBackend',
    'social_auth.backends.google.GoogleBackend',
    'social_auth.backends.contrib.yandex.YandexBackend',
    'django.contrib.auth.backends.ModelBackend',
)

LOGIN_URL          = '/login-form/'
LOGIN_REDIRECT_URL = '/logged-in/'
LOGIN_ERROR_URL    = '/login-error/'

SOCIAL_AUTH_USER_MODEL = 'main.CustomUser'

SOCIAL_AUTH_PIPELINE = (
    'social_auth.backends.pipeline.social.social_auth_user',
    'social_auth.backends.pipeline.associate.associate_by_email',
    'social_auth.backends.pipeline.misc.save_status_to_session',
    'main.pipeline.redirect_to_form',
    'main.pipeline.username',
    'social_auth.backends.pipeline.user.create_user',
    'social_auth.backends.pipeline.social.associate_user',
    'social_auth.backends.pipeline.social.load_extra_data',
    'social_auth.backends.pipeline.user.update_user_details',
    'social_auth.backends.pipeline.misc.save_status_to_session',
    'main.pipeline.redirect_to_form2',
    'main.pipeline.first_name',
)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:05:43+00:00Added an answer on June 8, 2026 at 11:05 am

    I found a solution after a little research.

    Problem was with fork, which I used. When I tried clean example from them, I get the same error, that table social_auth_association doesn’t exist.

    Then I tried to use original repository. And when I ran syncdb, I got:

    Creating table social_auth_usersocialauth
    Creating table social_auth_nonce
    Creating table social_auth_association
    

    So, the required table appeared. After that I compared sources from repositories and found lines, which affects the search for models:

    import types
    ..
    globals().update((name, value) for name, value in
        ((name, getattr(SOCIAL_AUTH_MODELS_MODULE, name))
            for name in dir(SOCIAL_AUTH_MODELS_MODULE))
                if isinstance(value, (type, types.ClassType)))
    

    instead of

    globals().update((name, getattr(SOCIAL_AUTH_MODELS_MODULE, name))
        for name in dir(SOCIAL_AUTH_MODELS_MODULE))
    

    in social_auth/models.py.

    In other words I replaced models.py from fork to models.py from original repository and ran syncdb.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.