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

This commit is contained in:
Marc-Andre Ferland
2022-10-17 22:35:51 -04:00
parent 03bd9a5731
commit 5b0b582039
2 changed files with 6 additions and 6 deletions

View File

@ -541,7 +541,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())