@kmccormick and @sarina . Thanks a lot for your response. Course looks like:
It seems like course structure is broken. I could not figure out where it happened.
cms-1 | 2025-08-27 21:00:16,641 WARNING 10 [xmodule.modulestore.split_mongo.mongo_connection] [user 4] mongo_connection.py:353 - doc was None when attempting to retrieve structure for item with key 68a43cefbdc4ed315278f05e
cms-1 | 2025-08-27 21:00:16,528 ERROR 11 [django.request] [user 4] [ip 98.10.245.69] log.py:241 - Internal Server Error: /api/courses/v1/validation/course-v1:DagX+AMA01+2022/
cms-1 | Traceback (most recent call last):
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/__init__.py", line 203, in bulk_operations
cms-1 | yield
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/mixed.py", line 1108, in bulk_operations
cms-1 | yield
cms-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/api/views/course_validation.py", line 80, in get
cms-1 | is_self_paced=course.self_paced,
cms-1 | ^^^^^^^^^^^^^^^^^
cms-1 | AttributeError: 'NoneType' object has no attribute 'self_paced'
cms-1 |
cms-1 | During handling of the above exception, another exception occurred:
cms-1 |
cms-1 | Traceback (most recent call last):
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
cms-1 | response = get_response(request)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
cms-1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 81, in inner
cms-1 | return func(*args, **kwds)
cms-1 | ^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
cms-1 | return view_func(*args, **kwargs)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
cms-1 | return self.dispatch(request, *args, **kwargs)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
cms-1 | response = self.handle_exception(exc)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
cms-1 | response = handler(request, *args, **kwargs)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/api/views/utils.py", line 136, in _wrapper_view
cms-1 | return view(self, request, course_key, *args, **kwargs)
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/api/views/course_validation.py", line 76, in get
cms-1 | with store.bulk_operations(course_key):
cms-1 | File "/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 158, in __exit__
cms-1 | self.gen.throw(typ, value, traceback)
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/mixed.py", line 1107, in bulk_operations
cms-1 | with store.bulk_operations(course_id, emit_signals, ignore_case):
cms-1 | File "/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 158, in __exit__
cms-1 | self.gen.throw(typ, value, traceback)
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/__init__.py", line 205, in bulk_operations
cms-1 | self._end_bulk_operation(course_id, emit_signals, ignore_case)
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/__init__.py", line 301, in _end_bulk_operation
cms-1 | dirty = self._end_outermost_bulk_operation(bulk_ops_record, structure_key) # lint-amnesty, pylint: disable=assignment-from-no-return
cms-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/split_mongo/split.py", line 263, in _end_outermost_bulk_operation
cms-1 | self.db_connection.insert_structure(bulk_write_record.structures[_id], bulk_write_record.course_key)
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/split_mongo/mongo_connection.py", line 409, in insert_structure
cms-1 | tagger.measure("blocks", len(structure["blocks"]))
cms-1 | ~~~~~~~~~^^^^^^^^^^
cms-1 | TypeError: 'NoneType' object is not subscriptable
cms-1 | 2025-08-27 21:00:16,644 ERROR 10 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
cms-1 | Traceback (most recent call last):
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/__init__.py", line 203, in bulk_operations
cms-1 | yield
cms-1 | File "/openedx/edx-platform/xmodule/modulestore/mixed.py", line 1108, in bulk_operations
cms-1 | yield
cms-1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/api/views/course_quality.py", line 107, in get
cms-1 | is_self_paced=course.self_paced,
cms-1 | ^^^^^^^^^^^^^^^^^
cms-1 | AttributeError: 'NoneType' object has no attribute 'self_paced'
cms-1 |