Merge pull request #351 from madrang/fix-bug332

Force encoding to utf-8 on text file operations Fixes #332
This commit is contained in:
cmdr2
2022-10-18 09:40:54 +05:30
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

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