Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

add comment

Windfarerbc0c2d23d5c3
diff --git a/docreader/parser/docx_parser.py b/docreader/parser/docx_parser.py
index 882da7e4c..7faf1cac9 100644
--- a/docreader/parser/docx_parser.py
+++ b/docreader/parser/docx_parser.py
@@ -11,10 +11,11 @@ from io import BytesIO
from multiprocessing import Manager
from typing import Any, Dict, List, Optional, Tuple
+
+# patch from https://github.com/python-openxml/python-docx/issues/1105#issuecomment-1298075246
from docx.opc.pkgreader import _SerializedRelationships, _SerializedRelationship
from docx.opc.oxml import parse_xml
-
def load_from_xml_v2(baseURI, rels_item_xml):
"""
Return |_SerializedRelationships| instance loaded with the
@@ -30,7 +31,6 @@ def load_from_xml_v2(baseURI, rels_item_xml):
srels._srels.append(_SerializedRelationship(baseURI, rel_elm))
return srels
-
_SerializedRelationships.load_from_xml = load_from_xml_v2
from docx import Document