Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Use UTF-8 for test case JSON files (#860)

Rolly Calmaa05875f09687
diff --git a/burr/lifecycle/default.py b/burr/lifecycle/default.py
index 0f7b86c9..8bc234a2 100644
--- a/burr/lifecycle/default.py
+++ b/burr/lifecycle/default.py
@@ -51,7 +51,7 @@ class StateAndResultsFullLogger(PostRunStepHook, PreRunStepHook):
raise ValueError(f"jsonl_path must end with .jsonl. Got: {jsonl_path}")
self.jsonl_path = jsonl_path
open_mode = "a" if mode == "append" else "w"
- self.f = open(jsonl_path, mode=open_mode) # open in append mode
+ self.f = open(jsonl_path, mode=open_mode, encoding="utf-8")
self.tracker = [] # tracker to keep track of timing/whatnot
self.json_dump = json_dump