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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user