mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 03:15:06 +08:00
fix: 修复文字转图片模块初始化时的bug
This commit is contained in:
8
main.py
8
main.py
@@ -175,10 +175,6 @@ async def start_process(first_time_init=False):
|
||||
except Exception as e:
|
||||
print("更新openai库失败:{}, 请忽略或自行更新".format(e))
|
||||
|
||||
# 初始化文字转图片
|
||||
from pkg.utils import text2img
|
||||
text2img.initialize()
|
||||
|
||||
known_exception_caught = False
|
||||
try:
|
||||
try:
|
||||
@@ -186,6 +182,10 @@ async def start_process(first_time_init=False):
|
||||
sh = reset_logging()
|
||||
pkg.utils.context.context['logger_handler'] = sh
|
||||
|
||||
# 初始化文字转图片
|
||||
from pkg.utils import text2img
|
||||
text2img.initialize()
|
||||
|
||||
# 检查是否设置了管理员
|
||||
if cfg['admin_qq'] == 0:
|
||||
# logging.warning("未设置管理员QQ,管理员权限命令及运行告警将无法使用,如需设置请修改config.py中的admin_qq字段")
|
||||
|
||||
Reference in New Issue
Block a user