Error registering users

Hi,

tutor version 20.0.0

When new users register, the platform doesn’t send the activation email. When I check the logs, I see the following error:

2025-07-30 19:47:11,636 INFO 14 [openedx_events.tooling] [user 780] [ip ] tooling.py:179 - Responses of the Open edX Event <org.openedx.learning.student.registration.completed.v1>:
lms-1  | []
lms-1  | 2025-07-30 19:47:11,639 ERROR 14 [edx.discussion] [user 780] [ip ] user.py:1226 - Could not create comments service user with id 780
lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 189, in from_string
lms-1  |     namespace, rest = cls._separate_namespace(serialized)
lms-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 220, in _separate_namespace
lms-1  |     raise InvalidKeyError(cls, serialized)
lms-1  | opaque_keys.InvalidKeyError: <class 'opaque_keys.edx.keys.CourseKey'>: None
lms-1  |
lms-1  | During handling of the above exception, another exception occurred:
lms-1  |
lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/edx-platform/common/djangoapps/student/models/user.py", line 1223, in create_comments_service_user
lms-1  |     cc_user.save()
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 170, in save
lms-1  |     response = self.handle_update(params)
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 235, in handle_update
lms-1  |     response = self.handle_update_user(request_params, str(course_key))
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 248, in handle_update_user
lms-1  |     response = forum_api.update_user(
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/api/users.py", line 58, in update_user
lms-1  |     backend = get_backend(course_id)()
lms-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/backend.py", line 35, in _get_backend
lms-1  |     if is_mysql_backend_enabled(course_id):
lms-1  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/backend.py", line 24, in is_mysql_backend_enabled
lms-1  |     course_key = CourseKey.from_string(course_id)
lms-1  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 198, in from_string
lms-1  |     return cls.deprecated_fallback._from_deprecated_string(serialized)  # type: ignore
lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/edx/locator.py", line 403, in _from_deprecated_string
lms-1  |     raise InvalidKeyError(cls, serialized)
lms-1  | opaque_keys.InvalidKeyError: <class 'opaque_keys.edx.locator.CourseLocator'>: None

I have activated the forum plugin.

Has anyone else had the same thing happen to them and how did you resolve it?

I just performed a clean install and got the same error.

I’ve attached the list of commands used, and the Tutor version is 20.0.0.

   35  docker ps
   36  sudo curl -L "https://github.com/overhangio/tutor/releases/download/v20.0.0/tutor-$(uname -s)_$(uname -m)" -o /usr/local/bin/tutor
   37  sudo chmod 0755 /usr/local/bin/tutor
   38  _TUTOR_COMPLETE=bash_source tutor >> ~/.bashrc
   39  source .bashrc
   40  tutor local launch
   41  tutor plugins list
   42  tutor plugins enable forum
   43  tutor local launch -I
   44  tutor local logs -f --tail 10 lms

error log

lms-1  | 2025-07-30 22:49:41,506 INFO 14 [tracking] [user 4] [ip 192.168.88.114] logger.py:41 - {"name": "edx.user.settings.changed", "context": {"user_id": null, "path": "/api/user/v2/account/registration/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "f7c71a2a34342fa135aaf2aee883722c", "ip": "192.168.88.114", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36", "host": "dev.lan", "referer": "http://apps.dev.lan/", "accept_language": "es-MX,es;q=0.9", "event": {"old": null, "new": "es-419", "truncated": [], "setting": "pref-lang", "user_id": 4, "table": "user_api_userpreference"}, "time": "2025-07-30T22:49:41.506324+00:00", "event_type": "edx.user.settings.changed", "event_source": "server", "page": null}
lms-1  | 2025-07-30 22:49:41,567 INFO 14 [openedx_events.tooling] [user 4] [ip 192.168.88.114] tooling.py:179 - Responses of the Open edX Event <org.openedx.learning.student.registration.completed.v1>:
lms-1  | []
lms-1  | 2025-07-30 22:49:41,571 ERROR 14 [edx.discussion] [user 4] [ip 192.168.88.114] user.py:1226 - Could not create comments service user with id 4
lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 189, in from_string
lms-1  |     namespace, rest = cls._separate_namespace(serialized)
lms-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 220, in _separate_namespace
lms-1  |     raise InvalidKeyError(cls, serialized)
lms-1  | opaque_keys.InvalidKeyError: <class 'opaque_keys.edx.keys.CourseKey'>: None
lms-1  |
lms-1  | During handling of the above exception, another exception occurred:
lms-1  |
lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/edx-platform/common/djangoapps/student/models/user.py", line 1223, in create_comments_service_user
lms-1  |     cc_user.save()
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 170, in save
lms-1  |     response = self.handle_update(params)
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 235, in handle_update
lms-1  |     response = self.handle_update_user(request_params, str(course_key))
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 248, in handle_update_user
lms-1  |     response = forum_api.update_user(
lms-1  |                ^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/api/users.py", line 58, in update_user
lms-1  |     backend = get_backend(course_id)()
lms-1  |               ^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/backend.py", line 35, in _get_backend
lms-1  |     if is_mysql_backend_enabled(course_id):
lms-1  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/forum/backend.py", line 24, in is_mysql_backend_enabled
lms-1  |     course_key = CourseKey.from_string(course_id)
lms-1  |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/__init__.py", line 198, in from_string
lms-1  |     return cls.deprecated_fallback._from_deprecated_string(serialized)  # type: ignore
lms-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lms-1  |   File "/openedx/venv/lib/python3.11/site-packages/opaque_keys/edx/locator.py", line 403, in _from_deprecated_string
lms-1  |     raise InvalidKeyError(cls, serialized)
lms-1  | opaque_keys.InvalidKeyError: <class 'opaque_keys.edx.locator.CourseLocator'>: None
lms-1  | 2025-07-30 22:49:41,578 INFO 14 [audit] [user 4] [ip 192.168.88.114] register.py:295 - Login success on new account creation - neto

@tutor-maintainers tagging you because this is an early user of Tutor 20 and they can’t get email to work, wondering if there’s an issue we missed in testing. AFAIK we had email working fine on the Teak testing box.

@tutor-maintainers ping again (11 days later) on this issue.

Missed it. We will take a look and get back on this.

@Abdul_Rehman has looked into the issue. It is happening due to an error in openedx/forum. There is an old open PR to fix that; we have commented on the PR to speed up the review.

Hello,
Thank you very much for responding. I’ve already seen the fix in the forum repository, but now how do I create the new forum image with this version?

Among other things, I would first need a legal conset from my former employer @abstract-technology, because I might have touched a related issue internally at time of working that relate to this issue, or any other.