From 1238c484511e4a54691fe2816b43833eac41399d Mon Sep 17 00:00:00 2001 From: Arnaud Gelas Date: Sat, 13 Jan 2024 15:14:38 +0100 Subject: [PATCH] Fix: requirements.txt was not written to the disk While the Python packages requirements are correctly detected and saved into the json task file, requirements.txt was always empty. Since it was trying to get packages with the wrong key, packages were always empty when writing in requirements.txt --- metagpt/actions/project_management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/actions/project_management.py b/metagpt/actions/project_management.py index e40c2034b..ea5e4016e 100644 --- a/metagpt/actions/project_management.py +++ b/metagpt/actions/project_management.py @@ -100,7 +100,7 @@ class WriteTasks(Action): @staticmethod async def _update_requirements(doc): m = json.loads(doc.content) - packages = set(m.get("Required Python third-party packages", set())) + packages = set(m.get("Required Python packages", set())) file_repo = CONFIG.git_repo.new_file_repository() requirement_doc = await file_repo.get(filename=PACKAGE_REQUIREMENTS_FILENAME) if not requirement_doc: