Hi
Tutor version: 16
Open edX version: Palm
I recently upgraded my Open edX platform (installed with Tutor) from Nutmeg to Palm (don’t know if this upgrade is the cause of the following issue though).
When I try to delete users from the admin console (either the LMS admin console or the CMS admin console) I get an 500 server error.
Here are the corresponding logs on the server:
tutor_local-lms-1 | 2023-09-17 21:49:15,887 ERROR 26 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
tutor_local-lms-1 | Traceback (most recent call last):
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
tutor_local-lms-1 | response = get_response(request)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
tutor_local-lms-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
tutor_local-lms-1 | File "/opt/pyenv/versions/3.8.15/lib/python3.8/contextlib.py", line 75, in inner
tutor_local-lms-1 | return func(*args, **kwds)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/options.py", line 616, in wrapper
tutor_local-lms-1 | return self.admin_site.admin_view(view)(*args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
tutor_local-lms-1 | response = view_func(request, *args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
tutor_local-lms-1 | response = view_func(request, *args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/sites.py", line 232, in inner
tutor_local-lms-1 | return view(request, *args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
tutor_local-lms-1 | return bound_method(*args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
tutor_local-lms-1 | response = view_func(request, *args, **kwargs)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/options.py", line 1851, in delete_view
tutor_local-lms-1 | return self._delete_view(request, object_id, extra_context)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/options.py", line 1872, in _delete_view
tutor_local-lms-1 | deleted_objects, model_count, perms_needed, protected = self.get_deleted_objects([obj], request)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/options.py", line 1846, in get_deleted_objects
tutor_local-lms-1 | return get_deleted_objects(objs, request, self.admin_site)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 152, in get_deleted_objects
tutor_local-lms-1 | to_delete = collector.nested(format_callback)
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 214, in nested
tutor_local-lms-1 | roots.extend(self._nested(root, seen, format_callback))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 198, in _nested
tutor_local-lms-1 | children.extend(self._nested(child, seen, format_callback))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 198, in _nested
tutor_local-lms-1 | children.extend(self._nested(child, seen, format_callback))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 200, in _nested
tutor_local-lms-1 | ret = [format_callback(obj)]
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/contrib/admin/utils.py", line 127, in format_callback
tutor_local-lms-1 | no_edit_link = '%s: %s' % (capfirst(opts.verbose_name), obj)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/courseware/models.py", line 291, in __str__
tutor_local-lms-1 | return str(repr(self))
tutor_local-lms-1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 521, in __repr__
tutor_local-lms-1 | return '<%s: %s>' % (self.__class__.__name__, self)
tutor_local-lms-1 | File "/openedx/edx-platform/./lms/djangoapps/coursewa
...
tutor_local-lms-1 | RecursionError: maximum recursion depth exceeded while getting the str of an object
I managed to delete the user using the command line though tutor local run lms ./manage.py lms manage_user --remove <user_name> <user_email>
Any idea ?
Thanks