From 6aa4f9cc6ac692d5d2db36d22d8098b45a1af83e Mon Sep 17 00:00:00 2001 From: Mattias Michaux Date: Tue, 28 Jan 2025 14:37:10 +0100 Subject: [PATCH] fix: use correct json load method when loading flow from file (#5936) load json from string instead of file --- src/backend/base/langflow/load/load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/load/load.py b/src/backend/base/langflow/load/load.py index 7914d43f3..d1b2cec42 100644 --- a/src/backend/base/langflow/load/load.py +++ b/src/backend/base/langflow/load/load.py @@ -58,7 +58,7 @@ async def aload_flow_from_json( if isinstance(flow, str | Path): async with async_open(Path(flow).name, encoding="utf-8") as f: content = await f.read() - flow_graph = json.load(content) + flow_graph = json.loads(content) # If input is a dictionary, assume it's a JSON object elif isinstance(flow, dict): flow_graph = flow