From 06b0609badcf3d4647ec2cfef2d1bbffc6206ee4 Mon Sep 17 00:00:00 2001 From: Maxim Rudenko Date: Tue, 11 Jul 2023 16:26:31 +0300 Subject: [PATCH] fixed bug with UnicodeEncodeError when pull history in text format with output directory --- exporter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter.py b/exporter.py index d993cdc..bb47592 100755 --- a/exporter.py +++ b/exporter.py @@ -505,7 +505,7 @@ if __name__ == "__main__": os.makedirs(out_dir, exist_ok=True) full_filepath = os.path.join(out_dir, filename) print("Writing output to %s" % full_filepath) - with open(full_filepath, mode="w") as f: + with open(full_filepath, mode="w", encoding="utf-8") as f: if a.json: json.dump(data, f, indent=4) else: