MoonRide303 commited on
Commit ·
bb4b7e2
1
Parent(s): 2f56464
Fixed encoding when writing text files (#197)
Browse files11 unmodified lines121314151617181920212211 unmodified lineshtml_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')if not os.path.exists(html_name):with open(html_name, 'a+') as f:f.write(f"<p>Fooocus Log {date_string} (private)</p>\n")f.write(f"<p>All images do not contain any hidden data.</p>")with open(html_name, 'a+') as f:div_name = only_name.replace('.', '_')f.write(f'<div id="{div_name}"><hr>\n')f.write(f"<p>{only_name}</p>\n")11 unmodified lines121314151617181920212211 unmodified lineshtml_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')if not os.path.exists(html_name):with open(html_name, 'a+', encoding='utf-8') as f:f.write(f"<p>Fooocus Log {date_string} (private)</p>\n")f.write(f"<p>All images do not contain any hidden data.</p>")with open(html_name, 'a+', encoding='utf-8') as f:div_name = only_name.replace('.', '_')f.write(f'<div id="{div_name}"><hr>\n')f.write(f"<p>{only_name}</p>\n")
modules/private_logger.py+2-2