fixed: prestartup_script.py error when config.ini is not exists

This commit is contained in:
Dr.Lt.Data 2025-02-02 23:41:01 +09:00
parent 524ff9a4a6
commit ced93b0525
3 changed files with 15 additions and 23 deletions

View File

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

View File

@ -57,22 +57,6 @@ def is_import_failed_extension(name):
return name in import_failed_extensions
def check_file_logging():
global enable_file_logging
try:
import configparser
config = configparser.ConfigParser()
config.read(manager_config_path)
default_conf = config['default']
if 'file_logging' in default_conf and default_conf['file_logging'].lower() == 'false':
enable_file_logging = False
except Exception:
pass
check_file_logging()
comfy_path = os.environ.get('COMFYUI_PATH')
comfy_base_path = os.environ.get('COMFYUI_FOLDERS_BASE_PATH')
@ -107,19 +91,27 @@ default_conf = {}
def read_config():
global default_conf
import configparser
config = configparser.ConfigParser()
config.read(manager_config_path)
default_conf = config['default']
try:
import configparser
config = configparser.ConfigParser()
config.read(manager_config_path)
default_conf = config['default']
except Exception:
pass
def read_uv_mode():
if 'use_uv' in default_conf:
manager_util.use_uv = default_conf['use_uv']
def check_file_logging():
global enable_file_logging
if 'file_logging' in default_conf and default_conf['file_logging'].lower() == 'false':
enable_file_logging = False
read_config()
read_uv_mode()
check_file_logging()
cm_global.pip_overrides = {'numpy': 'numpy<2', 'ultralytics': 'ultralytics==8.3.40'}
if os.path.exists(manager_pip_overrides_path):

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.17.5"
version = "3.17.6"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]