diff --git a/ldp/alg/callbacks.py b/ldp/alg/callbacks.py index cbb6d16..e52d967 100644 --- a/ldp/alg/callbacks.py +++ b/ldp/alg/callbacks.py @@ -173,7 +173,7 @@ async def after_transition( # TODO: make this async? traj.to_jsonl(self.out_files[traj_id]) if transition.done: - with Path(self.env_files[traj_id]).open() as f: + with Path(self.env_files[traj_id]).open("w") as f: f.write(env.export_frame().model_dump_json(exclude={"state"}, indent=2))