Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

add encoding to open file

Gull Manc93208799745
diff --git a/scripts/file_operations.py b/scripts/file_operations.py
index c6066ef930..59b3a0d054 100644
--- a/scripts/file_operations.py
+++ b/scripts/file_operations.py
@@ -38,7 +38,7 @@ def write_to_file(filename, text):
directory = os.path.dirname(filepath)
if not os.path.exists(directory):
os.makedirs(directory)
- with open(filepath, "w") as f:
+ with open(filepath, "w", encoding='utf-8') as f:
f.write(text)
return "File written to successfully."
except Exception as e: