User can't reset password 500 error

405 views
Skip to first unread message

Rizky Ariestiyansyah

unread,
Nov 8, 2015, 9:23:12 PM11/8/15
to General Open edX discussion
Hi,

I've problem in my Open edX instance when tried to reset user password. it show 500 error server.

the log is

Nov  9 02:16:59 ip-172-31-6-86 [service_variant=lms][openedx.core.djangoapps.user_api.helpers][env:sandbox] ERROR [ip-172-31-6-86  2138] [helpers.py:75] - An unexpected error occurred when calling 'request_password_change' with arguments '(u'ariestiyansyah.rizky@gmail.com', 'xxx.org', True)' and keyword arguments '{}': ValueError('incomplete format',)
Traceback (most recent call last):
 
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/helpers.py", line 46, in _wrapped
   
return func(*args, **kwargs)
 
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/accounts/api.py", line 403, in request_password_change
    use_https
=is_secure
 
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/forms.py", line 78, in save
    email
= loader.render_to_string(email_template_name, context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/loader.py", line 171, in render_to_string
   
return t.render(Context(dictionary))
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 140, in render
   
return self._render(context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 134, in _render
   
return self.nodelist.render(context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit
= self.render_node(node, context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 837, in render_node
   
return node.render(context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/defaulttags.py", line 31, in render
    output
= self.nodelist.render(context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 823, in render
    bit
= self.render_node(node, context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/template/base.py", line 837, in render_node
   
return node.render(context)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/templatetags/i18n.py", line 151, in render
    result
= result % data
ValueError: incomplete format
Nov  9 02:16:59 ip-172-31-6-86 [service_variant=lms][root][env:sandbox] ERROR [ip-172-31-6-86  2138] [exceptions.py:9] - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
    response
= callback(request, *callback_args, **callback_kwargs)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
   
return func(request, *args, **kwargs)
 
File "/edx/app/edxapp/edx-platform/lms/djangoapps/student_account/views.py", line 153, in password_change_request_handler
    request_password_change
(email, request.get_host(), request.is_secure())
 
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/helpers.py", line 76, in _wrapped
   
raise api_error(msg)
UserAPIInternalError: An unexpected error occurred when calling 'request_password_change' with arguments '(u'ariestiyansyah.rizky@gmail.com', 'xxx.org', True)' and keyword arguments '{}': ValueError('incomplete format',)
Nov  9 02:16:59 ip-172-31-6-86 [service_variant=lms][django.request][env:sandbox] ERROR [ip-172-31-6-86  2138] [base.py:213] - Internal Server Error: /account/password
Traceback (most recent call last):
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 109, in get_response
    response
= callback(request, *callback_args, **callback_kwargs)
 
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 41, in inner
   
return func(request, *args, **kwargs)
 
File "/edx/app/edxapp/edx-platform/lms/djangoapps/student_account/views.py", line 153, in password_change_request_handler
    request_password_change
(email, request.get_host(), request.is_secure())
 
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/user_api/helpers.py", line 76, in _wrapped
   
raise api_error(msg)
UserAPIInternalError: An unexpected error occurred when calling 'request_password_change' with arguments '(u'ariestiyansyah.rizky@gmail.com', 'xxx.org', True)' and keyword arguments '{}': ValueError('incomplete format',)


Can anyone help me solve this problem? thank you so much

Rizky Ariestiyansyah

unread,
Nov 15, 2015, 10:34:25 PM11/15/15
to General Open edX discussion
Anyone can help with this issue?
...

Felipe Montoya

unread,
Nov 18, 2015, 11:49:44 AM11/18/15
to General Open edX discussion
Hi Rizky,


What this stack trace is saying is that the password reset feature can't render the template it need to send the email. Most probably due to a badly formatted string going into the translation function. 


Cheers,
Felipe
...

mla...@agiweb.org

unread,
Jun 26, 2018, 4:29:03 PM6/26/18
to General Open edX discussion
did you ever solve this? we are having similar issues

On Sunday, November 8, 2015 at 9:23:12 PM UTC-5, Rizky Ariestiyansyah wrote:

Lupus Furyo

unread,
Jun 26, 2018, 8:49:15 PM6/26/18
to edx-...@googlegroups.com
Hi,
Try to run the following command
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws changepassword ariestiyansyah.rizky@gmail.com
Source:
Hope it helps.


--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/374ed8c3-6866-46c9-b7ae-bd3008ba7ab3%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages