Browse Source

fix: logger encoding

pull/68/head
Dr.Lt.Data 1 year ago
parent
commit
3cc7bbc600
  1. 2
      __init__.py
  2. 3
      prestartup_script.py

2
__init__.py

@ -55,7 +55,7 @@ sys.path.append('../..')
from torchvision.datasets.utils import download_url from torchvision.datasets.utils import download_url
# ensure .js # ensure .js
print("### Loading: ComfyUI-Manager (V0.22.2)") print("### Loading: ComfyUI-Manager (V0.22.3)")
comfy_ui_required_revision = 1240 comfy_ui_required_revision = 1240
comfy_ui_revision = "Unknown" comfy_ui_revision = "Unknown"

3
prestartup_script.py

@ -14,9 +14,10 @@ if os.path.exists("comfyui.log"):
original_stdout = sys.stdout original_stdout = sys.stdout
original_stderr = sys.stderr original_stderr = sys.stderr
class Logger: class Logger:
def __init__(self, filename): def __init__(self, filename):
self.file = open(filename, "a") self.file = open(filename, "w", encoding="utf-8")
def write(self, message): def write(self, message):
self.file.write(message) self.file.write(message)

Loading…
Cancel
Save