fixed: Modify the import of chardet to be lazy.

- "Prevent `chardet` from being imported in `manager_util` before automatic dependency installation."**

https://github.com/ltdrdata/ComfyUI-Manager/issues/1554
This commit is contained in:
Dr.Lt.Data
2025-02-16 20:29:29 +09:00
parent 59fb63f1f7
commit 3ddf414097
3 changed files with 3 additions and 3 deletions

View File

@@ -12,7 +12,6 @@ import subprocess
import sys
import re
import logging
import chardet
cache_lock = threading.Lock()
@@ -377,6 +376,7 @@ def sanitize_filename(input_string):
def robust_readlines(fullpath):
import chardet
try:
with open(fullpath, "r") as f:
return f.readlines()