Spaces:
Paused
Paused
MoonRide303
commited on
Commit
·
bb4b7e2
1
Parent(s):
2f56464
Fixed encoding when writing text files (#197)
Browse files
modules/private_logger.py
CHANGED
@@ -12,11 +12,11 @@ def log(img, dic):
|
|
12 |
html_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')
|
13 |
|
14 |
if not os.path.exists(html_name):
|
15 |
-
with open(html_name, 'a+') as f:
|
16 |
f.write(f"<p>Fooocus Log {date_string} (private)</p>\n")
|
17 |
f.write(f"<p>All images do not contain any hidden data.</p>")
|
18 |
|
19 |
-
with open(html_name, 'a+') as f:
|
20 |
div_name = only_name.replace('.', '_')
|
21 |
f.write(f'<div id="{div_name}"><hr>\n')
|
22 |
f.write(f"<p>{only_name}</p>\n")
|
|
|
12 |
html_name = os.path.join(os.path.dirname(local_temp_filename), 'log.html')
|
13 |
|
14 |
if not os.path.exists(html_name):
|
15 |
+
with open(html_name, 'a+', encoding='utf-8') as f:
|
16 |
f.write(f"<p>Fooocus Log {date_string} (private)</p>\n")
|
17 |
f.write(f"<p>All images do not contain any hidden data.</p>")
|
18 |
|
19 |
+
with open(html_name, 'a+', encoding='utf-8') as f:
|
20 |
div_name = only_name.replace('.', '_')
|
21 |
f.write(f'<div id="{div_name}"><hr>\n')
|
22 |
f.write(f"<p>{only_name}</p>\n")
|