mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
add encoding to open file
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user