Merge pull request #394 from GuyPaddock/patch-2

Fix `UnicodeEncodeError` on Windows Platforms
This commit is contained in:
Eren Gölge
2021-03-22 13:58:39 +01:00
committed by GitHub
+1 -1
View File
@@ -69,7 +69,7 @@ def copy_model_files(c, config_file, out_path, new_fields):
else:
new_line = '"{}":{},\n'.format(key, json.dumps(value, ensure_ascii=False))
config_lines.insert(1, new_line)
config_out_file = open(copy_config_path, "w")
config_out_file = open(copy_config_path, "w", encoding="utf-8")
config_out_file.writelines(config_lines)
config_out_file.close()
# copy model stats file if available