mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-01-01 17:50:48 +08:00
fix: error by encoding other than utf-8
This commit is contained in:
parent
23a190eeb9
commit
62d87087f8
@ -28,7 +28,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||||
|
|
||||||
|
|
||||||
version = [1, 25, 3]
|
version = [1, 25, 4]
|
||||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ try:
|
|||||||
is_start_mode = True
|
is_start_mode = True
|
||||||
is_import_fail_mode = False
|
is_import_fail_mode = False
|
||||||
|
|
||||||
log_file = open(f"comfyui{postfix}.log", "w", encoding="utf-8")
|
log_file = open(f"comfyui{postfix}.log", "w", encoding="utf-8", errors="ignore")
|
||||||
log_lock = threading.Lock()
|
log_lock = threading.Lock()
|
||||||
|
|
||||||
class ComfyUIManagerLogger:
|
class ComfyUIManagerLogger:
|
||||||
@ -338,7 +338,7 @@ if os.path.exists(restore_snapshot_path):
|
|||||||
cmd_str = [sys.executable, git_script_path, '--apply-snapshot', restore_snapshot_path]
|
cmd_str = [sys.executable, git_script_path, '--apply-snapshot', restore_snapshot_path]
|
||||||
exit_code = process_wrap(cmd_str, custom_nodes_path, handler=msg_capture)
|
exit_code = process_wrap(cmd_str, custom_nodes_path, handler=msg_capture)
|
||||||
|
|
||||||
with open(restore_snapshot_path, 'r', encoding="UTF-8") as json_file:
|
with open(restore_snapshot_path, 'r', encoding="UTF-8", errors="ignore") as json_file:
|
||||||
info = json.load(json_file)
|
info = json.load(json_file)
|
||||||
for url in cloned_repos:
|
for url in cloned_repos:
|
||||||
try:
|
try:
|
||||||
@ -352,7 +352,7 @@ if os.path.exists(restore_snapshot_path):
|
|||||||
this_exit_code = 0
|
this_exit_code = 0
|
||||||
|
|
||||||
if os.path.exists(requirements_path):
|
if os.path.exists(requirements_path):
|
||||||
with open(requirements_path, 'r', encoding="UTF-8") as file:
|
with open(requirements_path, 'r', encoding="UTF-8", errors="ignore") as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
package_name = line.strip()
|
package_name = line.strip()
|
||||||
if package_name and not is_installed(package_name):
|
if package_name and not is_installed(package_name):
|
||||||
@ -413,7 +413,7 @@ if os.path.exists(script_list_path):
|
|||||||
|
|
||||||
executed = set()
|
executed = set()
|
||||||
# Read each line from the file and convert it to a list using eval
|
# Read each line from the file and convert it to a list using eval
|
||||||
with open(script_list_path, 'r', encoding="UTF-8") as file:
|
with open(script_list_path, 'r', encoding="UTF-8", errors="ignore") as file:
|
||||||
for line in file:
|
for line in file:
|
||||||
if line in executed:
|
if line in executed:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user