2013-05-02 3 views
0

ImportError를 트위터 연결을 시도/ 이있는 전체 역 추적 나는 내 프로젝트에 트위터를 연결하려고했던이 오류를했다 social.pipeline 이름 없음 모듈입니다 몸 해결하는 방법을 어떤 생각을 가지고 그것을오류가 완료되면/트위터 /에서 장고 사회 인증으로

환경 :

Request Method: GET 
Request URL: http://127.0.0.1:8000/complete/twitter/?   oauth_token=gqaWZAszthiQJEUaZHF72U1y7hGimCLGSGxr6YLUU&oauth_verifier=YAkKy9Q71YrScl1psUXBApx XeQITAcDm6ObCoxdjc 

Django Version: 1.5 
Python Version: 2.7.3 
Installed Applications: 
('django.contrib.auth', 
'django.contrib.contenttypes', 
'django.contrib.sessions', 
'django.contrib.sites', 
'django.contrib.messages', 
'django.contrib.staticfiles', 
'django.contrib.admin', 
'tager_www', 
'fbregister', 
'captcha', 
'django_twilio', 
'social_auth') 
Installed Middleware: 
('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'django.contrib.auth.middleware.AuthenticationMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware') 


Traceback: 
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 
115.       response = callback(request, *callback_args, **callback_kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 
77.   return view_func(*args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23- py2.7.egg/social_auth/decorators.py" in wrapper 
29.    return func(request, request.social_auth_backend, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23- py2.7.egg/social_auth/views.py" in complete 
41.   return complete_process(request, backend, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/views.py" in complete_process 
107.  user = auth_complete(request, backend, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/views.py" in auth_complete 
190.  return backend.auth_complete(user=user, request=request, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/backends/twitter.py" in auth_complete 
87.    return super(TwitterAuth, self).auth_complete(*args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/backends/__init__.py" in auth_complete 
656.   return self.do_auth(access_token, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/backends/__init__.py" in do_auth 
672.   return authenticate(*args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/__init__.py" in authenticate 
59.    user = backend.authenticate(**credentials) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/backends/__init__.py" in authenticate 
107.   out = self.pipeline(pipeline, *args, **kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django_social_auth-0.7.23-py2.7.egg/social_auth/backends/__init__.py" in pipeline 
132.    mod = import_module(mod_name) 
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module 
35.  __import__(name) 

Exception Type: ImportError at /complete/twitter/ 
Exception Value: No module named social.pipeline 

형태의 settings.py :

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', 
'social.pipeline.redirect_to_form', 
'social.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', 
'social.pipeline.redirect_to_form2', 
'social.pipeline.first_name', 
) 
+0

쇼'PIPELINE'합니다. 그리고'settings.py'의''SOCIAL_AUTH_PIPELINE''도 존재합니다. – soon

+0

@soon settings.py에서 SOCIAL_AUTH_PIPELINE을 추가했습니다. – user2287768

+0

''social.pipeline ... ''행의 문제점. 당신은'social.pipeline' 모듈이 존재 하는가? – soon

답변

1

질문과 직접적인 관련이 없지만이 오류를 검색 할 때 Google이 보여준 유일한 관련 페이지이므로 동일한 실수를하는 사람이이를 볼 수 있기를 기대합니다. 내가지고 있다고 오류 : 나는 python-social-auth으로 django-social-auth 파이프 라인을 사용하려고했기 때문에 나는이 오류가 발생했습니다

ImportError at /complete/facebook/ 
No module named pipeline.social_auth 

. 당신이 python-social-auth를 사용하는 경우, 다음이 필요합니다./\ _ \ _ 초기화 \ _ \ _ py_ _social_auth/백엔드에서

SOCIAL_AUTH_PIPELINE = (
    'social.pipeline.social_auth.social_details', 
    'social.pipeline.social_auth.social_uid', 
    'social.pipeline.social_auth.auth_allowed', 
    'social.pipeline.social_auth.social_user', 
    'social.pipeline.user.get_username', 
    #'social.pipeline.social_auth.associate_by_email', 
    'social.pipeline.user.create_user', 
    'social.pipeline.social_auth.associate_user', 
    'social.pipeline.social_auth.load_extra_data', 
    'social.pipeline.user.user_details' 
) 

More details can be found here.