500 Internal Server Error for /rest-auth/password/reset/
See original GitHub issueWhen I tried to use the /rest-auth/password/reset/ endpoint to reset password, I got this error. It was fine for v0.5, but not v0.6. Thanks.
Trackback:
Internal Server Error: /rest-auth/password/reset/
Traceback (most recent call last):
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/defaulttags.py", line 501, in render
current_app=current_app)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/core/urlresolvers.py", line 578, in reverse
return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/core/urlresolvers.py", line 495, in _reverse_with_prefix
(lookup_view_s, args, kwargs, len(patterns), patterns))
django.core.urlresolvers.NoReverseMatch: Reverse for 'project.password_reset_confirm' with arguments '()' and keyword arguments '{'uidb64': b'Mg', 'token': '47i-9050dc8d943a476f73b9'}' not found. 0 pattern(s) tried: []
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, *args, **kwargs)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/rest_auth/views.py", line 112, in post
serializer.save()
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/rest_auth/serializers.py", line 131, in save
self.reset_form.save(**opts)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/contrib/auth/forms.py", line 256, in save
html_email_template_name=html_email_template_name)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/contrib/auth/forms.py", line 206, in send_mail
body = loader.render_to_string(email_template_name, context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/loader.py", line 99, in render_to_string
return template.render(context, request)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/backends/django.py", line 74, in render
return self.template.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/base.py", line 209, in render
return self._render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/test/utils.py", line 96, in instrumented_test_render
return self.nodelist.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/debug.py", line 79, in render_node
return node.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/defaulttags.py", line 40, in render
output = self.nodelist.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/debug.py", line 79, in render_node
return node.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/loader_tags.py", line 56, in render
result = self.nodelist.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/base.py", line 903, in render
bit = self.render_node(node, context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/debug.py", line 79, in render_node
return node.render(context)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/defaulttags.py", line 507, in render
six.reraise(*exc_info)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/utils/six.py", line 659, in reraise
raise value
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/template/defaulttags.py", line 493, in render
url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/core/urlresolvers.py", line 578, in reverse
return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/Users/ZachLiu/.virtualenvs/property_365/lib/python3.4/site-packages/django/core/urlresolvers.py", line 495, in _reverse_with_prefix
(lookup_view_s, args, kwargs, len(patterns), patterns))
django.core.urlresolvers.NoReverseMatch: Reverse for 'password_reset_confirm' with arguments '()' and keyword arguments '{'uidb64': b'Mg', 'token': '47i-9050dc8d943a476f73b9'}' not found. 0 pattern(s) tried: []
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Django-rest-auth - Angular - 500 internal error - Stack Overflow
My form is a very simple one with a 'ng-submit="register(email, username, password)' and 3 inputs ng-model='email' etc. My urls : urlpatterns = patterns('',...
Read more >[Solved]-Password reset showing 500 error in Open edX-django
Coding example for the question Password reset showing 500 error in Open ... This error caused by missing translation, explore and fix the...
Read more >500 Internal Server Error | Apigee Edge
The most likely cause for this issue is that the proper credentials (username/password, access token, etc.) are not passed to the backend server...
Read more >500 Error when trying to reset password in production - Reddit
I recently added password reset functionality to a Django site. It works locally, i.e. it sends an email with secure link, and the...
Read more >Authentication API Explorer - Auth0
When the user clicks on the password change link they will be redirected to a page asking them for a new password. This...
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
I had the same error when using django-rest-auth 0.9.0 with django-allauth 0.27.0. This SO post solved my error: http://stackoverflow.com/questions/26869309/django-rest-framework-django-allauth-password-reset-recovery/36365644#36365644
I’ll copy below in case it goes away. Since rest_framework beautifully integrates with allauth, I think this fix could be included in a future version.
I’m get some trouble a day ago, I thought that trouble must be documented.