Force encoding to utf-8 on text file operations Fixes #332

# Conflicts:
#	ui/server.py
This commit is contained in:
Marc-Andre Ferland
2022-10-17 23:15:36 -04:00
parent e24be913e5
commit 578b3ba4f4
2 changed files with 5 additions and 5 deletions

View File

@ -616,7 +616,7 @@ Negative Prompt: {req.negative_prompt}
Stable Diffusion model: {req.use_stable_diffusion_model + '.ckpt'}
'''
try:
with open(meta_out_path, 'w') as f:
with open(meta_out_path, 'w', encoding='utf-8') as f:
f.write(metadata)
except:
print('could not save the file', traceback.format_exc())