Discussions / Forum 500 on multiple APIs on Teak

Hi everyone, I’m working some things for the frontend-app-discussions MFE, before I started working on the code I was trying to test if everything was working properly on my local but it seems I have many 500 errors with a “default” config the console shows:

    context = get_context(course, request)

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/lms/djangoapps/discussion/rest_api/serializers.py", line 71, in get_context

    cc_requester = CommentClientUser.from_django_user(requester).retrieve(course_id=course.id)

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 70, in retrieve

    self._retrieve(*args, **kwargs)

  File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/user.py", line 228, in _retrieve

    response = forum_api.get_user(**params)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: get_user() missing 1 required positional argument: 'group_ids'

2025-08-15 21:36:53,738 ERROR 26 [django.request] [user None] [ip None] log.py:246 - Internal Server Error: /api/discussion/v1/threads/

Traceback (most recent call last):

  File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner

    response = get_response(request)

               ^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response

    response = wrapped_callback(request, *callback_args, **callback_kwargs)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 81, in inner

    return func(*args, **kwds)

           ^^^^^^^^^^^^^^^^^^^

  File "/openedx/venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view

    return view_func(*args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/venv/lib/python3.11/site-packages/rest_framework/viewsets.py", line 125, in view

    return self.dispatch(request, *args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch

    response = self.handle_exception(exc)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch

    response = handler(request, *args, **kwargs)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/lms/djangoapps/discussion/rest_api/views.py", line 667, in create

    return Response(create_thread(request, request.data))

                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/lms/djangoapps/discussion/rest_api/api.py", line 1480, in create_thread

    context = get_context(course, request)

              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/lms/djangoapps/discussion/rest_api/serializers.py", line 71, in get_context

    cc_requester = CommentClientUser.from_django_user(requester).retrieve(course_id=course.id)

                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 70, in retrieve

    self._retrieve(*args, **kwargs)

  File "/openedx/edx-platform/openedx/core/djangoapps/django_comment_common/comment_client/user.py", line 228, in _retrieve

    response = forum_api.get_user(**params)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

TypeError: get_user() missing 1 required positional argument: 'group_ids'

[15/Aug/2025 21:36:53] "POST /api/discussion/v1/threads/ HTTP/1.1" 500 396298

To have the forum running I installed the tutor plugin, enabled it, did a tutor dev launch, and then enrolled on a course with user and accessed the discussions MFE, I can see many discussions related API calls failing with 500 and any other stuff working correctly (I would upload an screeshot but I can’t given that I’m a new user)

Every other thing in EDX seems to working normally, and I ask a friend to also install the forum plugin to test and hast the same issue

Is there any known problem in discussions for Teak? or am I missing something?

Thanks in advance.

So debugging a bit more it seems that the code on master for discussions looks like this:

def get_user(
    user_id: str,
    group_ids: Optional[list[int]] = None,
    course_id: Optional[str] = None,
    complete: Optional[bool] = False,
) -> dict[str, Any]:

But the code that I have on my container looks like this:

def get_user(
    user_id: str,
    group_ids: list[int],
    course_id: Optional[str] = None,
    complete: Optional[bool] = False,
) -> dict[str, Any]:

Which would match why it fails like that, now the question would why does that happen? I mean I have the latest plugin version from tutor, so how do I get the latest for forum?

Hi @Javier_Ontiveros and welcome!

I’ve pinged a team working on the forums to provide an answer.

1 Like

@Javier_Ontiveros the teak release installs version 0.2.0 of forum whereas the fix was made afterwards and released in 0.3.1 version. Will you be able to install the updated version in your open edX instance?

@Taimoor_Ahmed should the Teak.2 release include a bump to this forums version then?

1 Like

I think if bumping the version can help us avoid issues it will be worth backporting it.

1 Like

yes, the updated version of forum is already available in master and since this bug fix was critical to forum, Teak.2 release should have the updated version in requirements.

I can definetly update, what would be the right path for it? I mean I though I would already have it so probably I just didn’t pulled the right way

No worries, we have pushed the fix to Teak now. You can use Teak 2 to get this fix.

Thanks forgot to come back and let know that with the latest on teak2 it does work

1 Like