From a4934403f0a6620d207a2faa6d613960521ec05c Mon Sep 17 00:00:00 2001 From: garylin2099 Date: Sun, 4 Aug 2024 17:33:22 +0800 Subject: [PATCH] fix write prd bug --- metagpt/actions/write_prd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/actions/write_prd.py b/metagpt/actions/write_prd.py index a062ece54..f66d586a3 100644 --- a/metagpt/actions/write_prd.py +++ b/metagpt/actions/write_prd.py @@ -313,7 +313,7 @@ class WritePRD(Action): if not output_pathname: output_pathname = DEFAULT_WORKSPACE_ROOT / "docs" / "prd.json" - output_pathname.mkdir(parents=True, exist_ok=True) + output_pathname.parent.mkdir(parents=True, exist_ok=True) elif not Path(output_pathname).is_absolute(): output_pathname = DEFAULT_WORKSPACE_ROOT / output_pathname output_pathname = Path(output_pathname)