From fc8a6d704ef78484d170673928f301b6fde0bb6f Mon Sep 17 00:00:00 2001 From: vasilije Date: Sat, 6 Sep 2025 04:08:45 -0700 Subject: [PATCH] added issue with path fixes --- cognee/tasks/ingestion/data_item_to_text_file.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cognee/tasks/ingestion/data_item_to_text_file.py b/cognee/tasks/ingestion/data_item_to_text_file.py index 9fcafca57..573fcd9e9 100644 --- a/cognee/tasks/ingestion/data_item_to_text_file.py +++ b/cognee/tasks/ingestion/data_item_to_text_file.py @@ -75,5 +75,16 @@ async def data_item_to_text_file( else: raise IngestionError(message="Local files are not accepted.") + # data is a relative file path (e.g., "file.json", "data/file.txt") + else: + # This is a relative file path - check if it exists and can be loaded + if settings.accept_local_file_path: + loader = get_loader_engine() + return await loader.load_file(data_item_path, preferred_loaders), loader.get_loader( + data_item_path, preferred_loaders + ) + else: + raise IngestionError(message="Local files are not accepted.") + # data is not a supported type raise IngestionError(message=f"Data type not supported: {type(data_item_path)}")