allauth>=0.25.0 : __init__() takes exactly 2 arguments (1 given) error
See original GitHub issueInternal Server Error: /rest-auth/facebook/
Traceback (most recent call last):
File "/Users/mywork/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/Users/mywork/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/mywork/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/mywork/venv/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, *args, **kwargs)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_auth/views.py", line 50, in post
self.serializer.is_valid(raise_exception=True)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/serializers.py", line 213, in is_valid
self._validated_data = self.run_validation(self.initial_data)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_framework/serializers.py", line 410, in run_validation
value = self.validate(value)
File "/Users/mywork/venv/lib/python2.7/site-packages/rest_auth/registration/serializers.py", line 63, in validate
adapter = adapter_class()
TypeError: __init__() takes exactly 2 arguments (1 given)
I just follow installation
from allauth.socialaccount.providers.facebook.views import FacebookOAuth2Adapter
from rest_auth.registration.views import SocialLoginView
class FacebookLogin(SocialLoginView):
adapter_class = FacebookOAuth2Adapter
urlpatterns = [
...
url(r'^rest-auth/', include('rest_auth.urls')),
url(r'^rest-auth/registration/', include('rest_auth.registration.urls')),
url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'),
]
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
python - __init__() takes exactly 2 arguments (1 given)?
I would like to know where am lagging, Looking for your advices.. class Student_Record(object): def __init__(self,s): self.
Read more >TypeError: __init__() takes exactly 2 arguments (1 given) #25
I had to set the AWS_XRAY_CONTEXT_MISSING setting to LOG_ERROR to avoid it and then got this error. Any help is appreciated.
Read more >TypeError: __init__() takes exactly 1 argument (2 given)
Getting the error on the line where I try to create the milton instance: class Employee(object): """Models real-life employees!
Read more >How to solve "TypeError: __init__() takes exactly 2 arguments ...
"Takes exactly 2 arguments" means self , which is automatically supplied, +1 other user-specified argument. This is because RemapRange is a ...
Read more >Python TypeError: init takes exactly 1 argument 2 given
Python TypeError: init takes exactly 1 argument 2 given. 13K views 7 years ago. ATOM. ATOM. 6.38K subscribers. Subscribe.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
0.8.1 is on pypi.
Current
0.7.0
version ofdjango-rest-auth
on the pypi that is last release version have this bug. So please release0.8.0
.