diff --git a/libs/langchain/langchain/document_loaders/obsidian.py b/libs/langchain/langchain/document_loaders/obsidian.py index 34743586719b9..3d7f455e86ec3 100644 --- a/libs/langchain/langchain/document_loaders/obsidian.py +++ b/libs/langchain/langchain/document_loaders/obsidian.py @@ -127,7 +127,9 @@ def load(self) -> List[Document]: } if tags or front_matter.get("tags"): - metadata["tags"] = ",".join(tags | set(front_matter.get("tags", []))) + metadata["tags"] = ",".join( + tags | set(front_matter.get("tags", []) or []) + ) docs.append(Document(page_content=text, metadata=metadata))