tschellenbach/Django-facebook — Issue #93: Join on field 'user' not permitted. Did you misspell 'email' for the lookup type?
Author: margagn
Created: 2012-03-01 14:08:39+00:00
State: open

I am currently trying to log in using the http://127.0.0.1:8000/facebook/connect/ page. After sign in, I am getting the following error: "Join on field 'user' not permitted. Did you misspell 'email' for the lookup type?". Any idea what I am missing?

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
28. user__email__iexact=facebook_email)[:1]
File "C:\Python27\lib\site-packages\django\db\models\query.py" in filter
550. return self._filter_or_exclude(False, *args, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in _filter_or_exclude
568. clone.query.add_q(Q(*args, **kwargs))
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in add_q
1194. can_reuse=used_aliases, force_having=force_having)
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in add_filter
1069. negate=negate, process_extras=process_extras)
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in setup_joins
1419. raise FieldError("Join on field %r not permitted. Did you misspell %r for the lookup type?" % (name, names[pos + 1]))

Exception Type: FieldError at /facebook/connect/
Exception Value: Join on field 'user' not permitted. Did you misspell 'email' for the lookup type?