Open settings.txt file for writing with UTF-8 encoding

Fixes UnicodeEncodeError exception 'charmap' codec can't encode character when using some artist names in languages other than English
pull/129/head
pharmapsychotic 2 years ago
parent 0bdfe346f5
commit 432dcd61e8
  1. 2
      disco.py

@ -1640,7 +1640,7 @@ def save_settings():
'video_init_blend_mode':video_init_blend_mode
}
# print('Settings:', setting_list)
with open(f"{batchFolder}/{batch_name}({batchNum})_settings.txt", "w+") as f: #save settings
with open(f"{batchFolder}/{batch_name}({batchNum})_settings.txt", "w+", encoding="utf-8") as f: #save settings
json.dump(setting_list, f, ensure_ascii=False, indent=4)
# %%

Loading…
Cancel
Save