Skip to content

Attempt to import "annotatable" block content into library fails #38809

Description

@ormsbee

Reproduction steps:

  1. Create a new course and import the following file into it: annotatable-course.tar.gz
  2. Import that new course into a library using the library's Tools -> Import -> Import Course functionality.

It will raise AttributeError: 'super' object has no attribute 'parse_xml_new_runtime' while processing the content of the AnnotatableBlock for import. The error log:

cms-1          | 2026-06-24 16:57:14,447 INFO 336 [celery.app.trace] [user 3] [ip 192.168.65.1] trace.py:128 - Task openedx.core.djangoapps.content_libraries.tasks.check_container_content_changes[41224e3f-2e29-453f-8285-5db00c6b0be1] succeeded in 0.20479319100559223s: None
cms-1          | 2026-06-24 16:57:14,448 INFO 336 [celery_utils.logged_task] [user 3] [ip 192.168.65.1] logged_task.py:25 - Task openedx.core.djangoapps.content_libraries.tasks.check_container_content_changes[41224e3f-2e29-453f-8285-5db00c6b0be1] submitted with arguments (), {'container_key_str': 'lct:Axim:ImportXMLBreaker1:subsection:welcome-to-the-community_1', 'old_version_id': None, 'new_version_id': 21093}
cms-1          | 2026-06-24 16:57:14,452 INFO 336 [openedx.core.djangoapps.content.search.tasks] [user 3] [ip 192.168.65.1] tasks.py:74 - Updating content index document for library block with id: lb:Axim:ImportXMLBreaker1:annotatable:b1067ae88289450f9887c38b28d8868b
cms-1          | 2026-06-24 16:57:14,851 WARNING 336 [py.warnings] [user 3] [ip 192.168.65.1] warnings.py:112 - /openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/runtime.py:144: UserIdDeprecationWarning: Runtime.user_id is deprecated
cms-1          |   self.user_id = None
cms-1          | 
cms-1          | 2026-06-24 16:57:14,856 WARNING 336 [py.warnings] [user 3] [ip 192.168.65.1] warnings.py:112 - /openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/openedx_content_runtime.py:198: UserIdDeprecationWarning: Runtime.user_id is deprecated
cms-1          |   keys = ScopeIds(self.user_id, block_type, None, usage_key)
cms-1          | 
cms-1          | 2026-06-24 16:57:14,858 ERROR 336 [celery_utils.logged_task] [user 3] [ip 192.168.65.1] logged_task.py:48 - [bbe5981b-dbb6-486c-b852-35771ec3036e] failed due to Traceback (most recent call last):
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 461, in parse_xml_new_runtime
cms-1          |     return super().parse_xml_new_runtime(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml_new_runtime'
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.12/site-packages/celery/app/trace.py", line 585, in trace_task
cms-1          |     R = retval = fun(*args, **kwargs)
cms-1          |                  ^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/celery/app/autoretry.py", line 38, in run
cms-1          |     return task._orig_run(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 195, in new_function
cms-1          |     return wrapped_function(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/tasks.py", line 76, in upsert_library_block_index_doc
cms-1          |     api.upsert_library_block_index_doc(usage_key)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/api.py", line 862, in upsert_library_block_index_doc
cms-1          |     docs = [searchable_doc_for_library_block(library_block_metadata)]
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/documents.py", line 306, in searchable_doc_for_library_block
cms-1          |     block = xblock_api.load_block(xblock_metadata.usage_key, user=None)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/api.py", line 114, in load_block
cms-1          |     return runtime.get_block(usage_key, version=version)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/openedx_content_runtime.py", line 214, in get_block
cms-1          |     block = block_class.parse_xml_new_runtime(xml_node, runtime=self, keys=keys)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 463, in parse_xml_new_runtime
cms-1          |     return super().parse_xml(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblock/core.py", line 789, in parse_xml
cms-1          |     block.runtime.add_node_as_child(block, child)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/runtime.py", line 272, in add_node_as_child
cms-1          |     raise NotImplementedError("XML Serialization is only supported with OpenedXContentRuntime")
cms-1          | NotImplementedError: XML Serialization is only supported with OpenedXContentRuntime
cms-1          | 
cms-1          | 2026-06-24 16:57:14,858 ERROR 336 [celery.app.trace] [user 3] [ip 192.168.65.1] trace.py:309 - Task openedx.core.djangoapps.content.search.tasks.upsert_library_block_index_doc[bbe5981b-dbb6-486c-b852-35771ec3036e] raised unexpected: NotImplementedError('XML Serialization is only supported with OpenedXContentRuntime')
cms-1          | Traceback (most recent call last):
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 461, in parse_xml_new_runtime
cms-1          |     return super().parse_xml_new_runtime(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml_new_runtime'
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.12/site-packages/celery/app/trace.py", line 585, in trace_task
cms-1          |     R = retval = fun(*args, **kwargs)
cms-1          |                  ^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/celery/app/autoretry.py", line 38, in run
cms-1          |     return task._orig_run(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 195, in new_function
cms-1          |     return wrapped_function(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/tasks.py", line 76, in upsert_library_block_index_doc
cms-1          |     api.upsert_library_block_index_doc(usage_key)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/api.py", line 862, in upsert_library_block_index_doc
cms-1          |     docs = [searchable_doc_for_library_block(library_block_metadata)]
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/documents.py", line 306, in searchable_doc_for_library_block
cms-1          |     block = xblock_api.load_block(xblock_metadata.usage_key, user=None)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/api.py", line 114, in load_block
cms-1          |     return runtime.get_block(usage_key, version=version)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/openedx_content_runtime.py", line 214, in get_block
cms-1          |     block = block_class.parse_xml_new_runtime(xml_node, runtime=self, keys=keys)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 463, in parse_xml_new_runtime
cms-1          |     return super().parse_xml(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblock/core.py", line 789, in parse_xml
cms-1          |     block.runtime.add_node_as_child(block, child)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/runtime.py", line 272, in add_node_as_child
cms-1          |     raise NotImplementedError("XML Serialization is only supported with OpenedXContentRuntime")
cms-1          | NotImplementedError: XML Serialization is only supported with OpenedXContentRuntime
cms-1          | 2026-06-24 16:57:14,860 INFO 336 [openedx.core.djangoapps.content.search.tasks] [user 3] [ip 192.168.65.1] tasks.py:74 - Updating content index document for library block with id: lb:Axim:ImportXMLBreaker1:discussion:language-learning-tools-and-tips
cms-1          | 2026-06-24 16:57:14,881 ERROR 336 [celery_utils.logged_task] [user 3] [ip 192.168.65.1] logged_task.py:48 - [b103b53d-22fe-4ee2-9209-1ad9518ef131] failed due to Traceback (most recent call last):
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 461, in parse_xml_new_runtime
cms-1          |     return super().parse_xml_new_runtime(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml_new_runtime'
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.12/site-packages/celery/app/trace.py", line 585, in trace_task
cms-1          |     R = retval = fun(*args, **kwargs)
cms-1          |                  ^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/celery/app/autoretry.py", line 38, in run
cms-1          |     return task._orig_run(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 195, in new_function
cms-1          |     return wrapped_function(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/tasks.py", line 76, in upsert_library_block_index_doc
cms-1          |     api.upsert_library_block_index_doc(usage_key)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/api.py", line 862, in upsert_library_block_index_doc
cms-1          |     docs = [searchable_doc_for_library_block(library_block_metadata)]
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/documents.py", line 306, in searchable_doc_for_library_block
cms-1          |     block = xblock_api.load_block(xblock_metadata.usage_key, user=None)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/api.py", line 114, in load_block
cms-1          |     return runtime.get_block(usage_key, version=version)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/openedx_content_runtime.py", line 214, in get_block
cms-1          |     block = block_class.parse_xml_new_runtime(xml_node, runtime=self, keys=keys)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 463, in parse_xml_new_runtime
cms-1          |     return super().parse_xml(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml'
cms-1          | 
cms-1          | 2026-06-24 16:57:14,882 ERROR 336 [celery.app.trace] [user 3] [ip 192.168.65.1] trace.py:309 - Task openedx.core.djangoapps.content.search.tasks.upsert_library_block_index_doc[b103b53d-22fe-4ee2-9209-1ad9518ef131] raised unexpected: AttributeError("'super' object has no attribute 'parse_xml'")
cms-1          | Traceback (most recent call last):
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 461, in parse_xml_new_runtime
cms-1          |     return super().parse_xml_new_runtime(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml_new_runtime'
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.12/site-packages/celery/app/trace.py", line 585, in trace_task
cms-1          |     R = retval = fun(*args, **kwargs)
cms-1          |                  ^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/celery/app/autoretry.py", line 38, in run
cms-1          |     return task._orig_run(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/edx_django_utils/monitoring/internal/code_owner/utils.py", line 195, in new_function
cms-1          |     return wrapped_function(*args, **kwargs)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/tasks.py", line 76, in upsert_library_block_index_doc
cms-1          |     api.upsert_library_block_index_doc(usage_key)
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/api.py", line 862, in upsert_library_block_index_doc
cms-1          |     docs = [searchable_doc_for_library_block(library_block_metadata)]
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/content/search/documents.py", line 306, in searchable_doc_for_library_block
cms-1          |     block = xblock_api.load_block(xblock_metadata.usage_key, user=None)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/api.py", line 114, in load_block
cms-1          |     return runtime.get_block(usage_key, version=version)
cms-1          |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/edx-platform/openedx/core/djangoapps/xblock/runtime/openedx_content_runtime.py", line 214, in get_block
cms-1          |     block = block_class.parse_xml_new_runtime(xml_node, runtime=self, keys=keys)
cms-1          |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cms-1          |   File "/openedx/venv/lib/python3.12/site-packages/xblocks_contrib/legacy_utils/xml_utils.py", line 463, in parse_xml_new_runtime
cms-1          |     return super().parse_xml(node, runtime, keys)
cms-1          |            ^^^^^^^^^^^^^^^^^
cms-1          | AttributeError: 'super' object has no attribute 'parse_xml'
cms-1          | 2026-06-24 16:57:14,884 INFO 336 [openedx.core.djangoapps.content.search.tasks] [user 3] [ip 192.168.65.1] tasks.py:74 - Updating content index document for library block with id: lb:Axim:ImportXMLBreaker1:done:af02a17e4cc642eba37953c4febf5746

The rest of the content of the course will import properly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions