Skip to content

Devika is the first open-source implementation of an Agentic Software Engineer. Initially started as an open-source alternative to Devin.

Python

Fix: io.UnsupportedOperation: not readable (#489)

FroDKc21647d77e71
diff --git a/src/config.py b/src/config.py
index 8ab74f6..f37c5e4 100644
--- a/src/config.py
+++ b/src/config.py
@@ -14,8 +14,9 @@ class Config:
def _load_config(self):
# If the config file doesn't exist, copy from the sample
if not os.path.exists("config.toml"):
- with open("sample.config.toml", "r") as f_in, open("config.toml", "w") as f_out:
+ with open("sample.config.toml", "r") as f_in, open("config.toml", "w+") as f_out:
f_out.write(f_in.read())
+ f_out.seek(0)
self.config = toml.load(f_out)
else:
# check if all the keys are present in the config file