Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

bugfix: #128 Delete special charactors at filename

voidking7fc5dd9da29f
diff --git a/metagpt/roles/engineer.py b/metagpt/roles/engineer.py
index bb29db30a..072e53998 100644
--- a/metagpt/roles/engineer.py
+++ b/metagpt/roles/engineer.py
@@ -93,6 +93,7 @@ class Engineer(Role):
def write_file(self, filename: str, code: str):
workspace = self.get_workspace()
+ filename = filename.replace('"', '').replace('\n', '')
file = workspace / filename
file.parent.mkdir(parents=True, exist_ok=True)
file.write_text(code)