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
commit 1c41c64a59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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