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

@ -42,7 +42,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 22]
version_code = [3, 22, 1]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')

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()

View File

@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "3.22"
version = "3.22.1"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]