Skip to content

Commit

Permalink
Colorlog and Packaging Dependencies Fail to Install
Browse files Browse the repository at this point in the history
Fixes #302
  • Loading branch information
mrhan1993 committed Apr 24, 2024
1 parent 93edabd commit 241539b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fooocusapi/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
import os
import sys

from colorlog import ColoredFormatter
try:
from colorlog import ColoredFormatter
except ImportError:
from fooocusapi.utils.tools import run_pip
run_pip(
command="install colorlog",
desc="Install colorlog for logger.",
live=True
)
finally:
from colorlog import ColoredFormatter


own_path = os.path.dirname(os.path.abspath(__file__))
log_dir = "logs"
Expand Down

0 comments on commit 241539b

Please sign in to comment.