I upgraded from tutor 12.0.4 Lilac to tutor 14.0.3 Nutmeg. I was getting errors not being able to access pages, and then I enabled the tutor “mfe” plugin based on some other people’s errors. Now I’m getting a different error when I attempt to access a course as an enrolled learning account rather than admin account:
“There was an error loading this course.”
The logs show the below, but the most relevant line is perhaps:
“openedx.core.djangoapps.content.learning_sequences.models.LearningContext.DoesNotExist: LearningContext matching query does not exist”
I can access the page fine in studio and all the content is still there, it’s only accessing as a student which no longer works.
Full error:
lms_1 | 2022-07-21 17:38:46,324 ERROR 7 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 223, in _get_course_context_for_outline
lms_1 | LearningContext.objects
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
lms_1 | raise self.model.DoesNotExist(
lms_1 | openedx.core.djangoapps.content.learning_sequences.models.LearningContext.DoesNotExist: LearningContext matching query does not exist.
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/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
lms_1 | response = get_response(request)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
lms_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
lms_1 | return view_func(*args, **kwargs)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
lms_1 | return self.dispatch(request, *args, **kwargs)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
lms_1 | response = self.handle_exception(exc)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
lms_1 | self.raise_uncaught_exception(exc)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
lms_1 | raise exc
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
lms_1 | response = handler(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/./lms/djangoapps/course_home_api/outline/views.py", line 295, in get
lms_1 | user_course_outline = get_user_course_outline(
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 268, in get_user_course_outline
lms_1 | user_course_outline, _ = _get_user_course_outline_and_processors(course_key, user, at_time)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 316, in _get_user_course_outline_and_processors
lms_1 | full_course_outline = get_course_outline(course_key)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 112, in get_course_outline
lms_1 | course_context = _get_course_context_for_outline(course_key)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 230, in _get_course_context_for_outline
lms_1 | raise CourseOutlineData.DoesNotExist( # lint-amnesty, pylint: disable=raise-missing-from
lms_1 | openedx.core.djangoapps.content.learning_sequences.data.CourseOutlineData.DoesNotExist: No CourseOutlineData for course-v1:MyOrg+MyClass+Run1
lms_1 | 2022-07-21 17:38:46,442 ERROR 7 [django.request] [user 5] [ip 1.2.3.4] log.py:224 - Internal Server Error: /api/course_home/outline/course-v1:MyOrg+MyClass+Run1
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 223, in _get_course_context_for_outline
lms_1 | LearningContext.objects
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 435, in get
lms_1 | raise self.model.DoesNotExist(
lms_1 | openedx.core.djangoapps.content.learning_sequences.models.LearningContext.DoesNotExist: LearningContext matching query does not exist.
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/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
lms_1 | response = get_response(request)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
lms_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
lms_1 | return view_func(*args, **kwargs)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
lms_1 | return self.dispatch(request, *args, **kwargs)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
lms_1 | response = self.handle_exception(exc)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
lms_1 | self.raise_uncaught_exception(exc)
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
lms_1 | raise exc
lms_1 | File "/openedx/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
lms_1 | response = handler(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/./lms/djangoapps/course_home_api/outline/views.py", line 295, in get
lms_1 | user_course_outline = get_user_course_outline(
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 268, in get_user_course_outline
lms_1 | user_course_outline, _ = _get_user_course_outline_and_processors(course_key, user, at_time)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 316, in _get_user_course_outline_and_processors
lms_1 | full_course_outline = get_course_outline(course_key)
lms_1 | File "/opt/pyenv/versions/3.8.12/lib/python3.8/contextlib.py", line 75, in inner
lms_1 | return func(*args, **kwds)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 112, in get_course_outline
lms_1 | course_context = _get_course_context_for_outline(course_key)
lms_1 | File "/openedx/edx-platform/./openedx/core/djangoapps/content/learning_sequences/api/outlines.py", line 230, in _get_course_context_for_outline
lms_1 | raise CourseOutlineData.DoesNotExist( # lint-amnesty, pylint: disable=raise-missing-from
lms_1 | openedx.core.djangoapps.content.learning_sequences.data.CourseOutlineData.DoesNotExist: No CourseOutlineData for course-v1:MyOrg+MyClass+Run1
lms_1 | [pid: 7|app: 0|req: 8/20] 172.19.0.4 () {54 vars in 3412 bytes} [Thu Jul 21 17:38:43 2022] GET /api/course_home/outline/course-v1:MyOrg+MyClass+Run1 => generated 9552 bytes in 3006 msecs (HTTP/1.1 500) 9 headers in 617 bytes (1 switches on core 0)