Error in course discussion because user deletion from Django Admin Page

371 views
Skip to first unread message

Febrian Yuwono

unread,
Nov 17, 2016, 12:05:37 AM11/17/16
to General Open edX discussion
Hello, I just recently installed open edx with automated installation from this link :
and i tried creating some users and courses, but when i delete a user with username X from Django Admin Page (openedxURL/admin), and then recreated the username X again (but with different email), I got error when opening the discussion in a course.
The error log are : 

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/forum/views.py", line 183, in wrapped_view
    return view_func(request, course_key, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/django_comment_client/forum/views.py", line 234, in forum_form_discussion
    user_info = user.to_dict()
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/models.py", line 60, in to_dict
    self.retrieve()
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/models.py", line 65, in retrieve
    self._retrieve(*args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/user.py", line 157, in _retrieve
    self.save()
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/models.py", line 142, in save
    metric_action='model.update'
  File "/edx/app/edxapp/edx-platform/lms/lib/comment_client/utils.py", line 101, in perform_request
    raise CommentClientRequestError(response.text, response.status_code)
CommentClientRequestError: u'["Username is already taken"]'

When i check the database, I saw that the ID from username X in the SQL was 11, but in the mongo was 6, I believe this is because when I delete the user from django admin panel, the user in mongo was not deleted.
Should i just delete the user in mongo? or are there any other solution?
Thanks,
Febrian Yuwono

Mahyar Damavand

unread,
Jun 17, 2018, 3:56:17 AM6/17/18
to General Open edX discussion
Hi all,
I have this problem too.
Is there a better way to remove a user?
Reply all
Reply to author
Forward
0 new messages