omab / python-social-auth

Social auth made simple
http://psa.matiasaguirre.net
BSD 3-Clause "New" or "Revised" License
2.83k stars 1.09k forks source link

ImportError: No module named django_app #935

Closed addodelgrossi closed 8 years ago

addodelgrossi commented 8 years ago

I have the error:

ImportError: No module named django_app

pip freeze
contextlib2==0.5.3
dj-database-url==0.4.1
Django==1.9.7
gunicorn==19.6.0
oauthlib==1.1.2
PyJWT==1.4.0
python-openid==2.2.5
python-social-auth==0.2.19
raven==5.20.0
requests==2.10.0
requests-oauthlib==0.6.1
six==1.10.0
(v180) C:\Users\aa\PycharmProjects\vinil180>python manage.py runserver
Unhandled exception in thread started by <function wrapper at 0x03DFEE70>
Traceback (most recent call last):
  File "C:\Users\aa\v180\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\aa\v180\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "C:\Users\aa\v180\lib\site-packages\django\utils\autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "C:\Users\aa\v180\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\aa\v180\lib\site-packages\django\__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\aa\v180\lib\site-packages\django\apps\registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "C:\Users\aa\v180\lib\site-packages\django\apps\config.py", line 116, in create
    mod = import_module(mod_path)
  File "C:\Python27\Lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named django_app
AndreasBackx commented 8 years ago

Can you please post your INSTALLED_APPS variable in settings.py? Make sure it contains 'social.apps.django_app.default'. Your error is saying it can't find the module django_apps.

addodelgrossi commented 8 years ago

My INSTALLED_APPS

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'core',
    'store',
    'api',
    'account',
    'sell',
    'social',
    'training',
    'raven.contrib.django.raven_compat',
    'social.apps.django_app.default'
)
AndreasBackx commented 8 years ago

Either your own app social is interfering with social.apps.django_app.default or there is something wrong with your environment. This shouldn't be the library's fault.

This is also a duplicate of #902.

addodelgrossi commented 8 years ago

Thanks for the reply.

I just make one more test, removing my social app and the error persists.

It could be a conflict with other libraries?

pip freeze
contextlib2==0.5.3
dj-database-url==0.4.1
Django==1.9.7
gunicorn==19.6.0
oauthlib==1.1.2
PyJWT==1.4.0
python-openid==2.2.5
python-social-auth==0.2.19
raven==5.20.0
requests==2.10.0
requests-oauthlib==0.6.1
six==1.10.0
AndreasBackx commented 8 years ago

Best to check your own environment and app labels can conflict with one another which might be the cause. But I haven't looked very far into this. See applications.

addodelgrossi commented 8 years ago

OK, thank you

I can trying create new django application and only add python-social-auth, but I using the same version.

After the test, I reply the result.

addodelgrossi commented 8 years ago

@AndreasBackx the problem was just to have another application with the social name

thank you advanced