Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Fix NoneType error #683

davidmezzettid41486423b2e
diff --git a/src/python/txtai/pipeline/data/textractor.py b/src/python/txtai/pipeline/data/textractor.py
index 3a428841..5a32cd47 100644
--- a/src/python/txtai/pipeline/data/textractor.py
+++ b/src/python/txtai/pipeline/data/textractor.py
@@ -234,7 +234,7 @@ class Extract:
True if this is a container element, False otherwise
"""
- return node.name in ("div", "body") or (children and not any(isinstance(x, NavigableString) for x in children))
+ return children and (node.name in ("div", "body") or not any(isinstance(x, NavigableString) for x in children))
def children(self, node):
"""