Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: docx parse error. (#8600)

wenxuan.zhangf586dd0a9610
diff --git a/rag/app/naive.py b/rag/app/naive.py
index 809da121d3..1fd661b09e 100644
--- a/rag/app/naive.py
+++ b/rag/app/naive.py
@@ -121,7 +121,7 @@ class Docx(DocxParser):
if block_type != 'p':
continue
- if block.style and re.search(r"Heading\s*(\d+)", block.style.name, re.I):
+ if block.style and block.style.name and re.search(r"Heading\s*(\d+)", block.style.name, re.I):
try:
level_match = re.search(r"(\d+)", block.style.name)
if level_match: