tschellenbach/Django-facebook — Issue #92: Exception Value: 'NoneType' object has no attribute 'objects'
Author: margagn
Created: 2012-03-01 06:20:40+00:00
State: open

When I try to login, I am getting the following error: "Exception Value: 'NoneType' object has no attribute 'objects'". What could be the cause of this?

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/facebook/connect/?facebook_login=1

Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_facebook',
'tg']
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 "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python27\lib\site-packages\django\views\decorators\csrf.py" in wrapped_view
39. resp = view_func(*args, **kwargs)
File "C:\Python27\lib\site-packages\django\views\decorators\csrf.py" in wrapped_view
52. return view_func(*args, **kwargs)
File "C:\Python27\lib\site-packages\django_facebook\decorators.py" in _wrapped_view
67. return view_func(request, *args, **kwargs)
File "C:\Python27\lib\site-packages\django_facebook\views.py" in connect
94. action, user = connect_user(request)
File "C:\Python27\lib\site-packages\django_facebook\connect.py" in connect_user
59. auth_user = authenticate(facebook_id=facebook_data['id'], **kwargs)
File "C:\Python27\lib\site-packages\django\contrib\auth\__init__.py" in authenticate
55. user = backend.authenticate(**credentials)
File "C:\Python27\lib\site-packages\django_facebook\auth_backends.py" in authenticate
16. profile_query = profile_class.objects.all().order_by('user')

Exception Type: AttributeError at /facebook/connect/
Exception Value: 'NoneType' object has no attribute 'objects'