From 42c7034fb2711bb2004d68d826d4a7cff8998cc1 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sun, 11 May 2025 18:17:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/cli/commands/cmd_run.py | 3 ++- astrbot/dashboard/server.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/astrbot/cli/commands/cmd_run.py b/astrbot/cli/commands/cmd_run.py index 76256ae4b..38113744f 100644 --- a/astrbot/cli/commands/cmd_run.py +++ b/astrbot/cli/commands/cmd_run.py @@ -4,6 +4,7 @@ from pathlib import Path import click import asyncio +import traceback from filelock import FileLock, Timeout @@ -59,4 +60,4 @@ def run(reload: bool, port: str) -> None: except Timeout: raise click.ClickException("无法获取锁文件,请检查是否有其他实例正在运行") except Exception as e: - raise click.ClickException(f"运行时出现错误: {e!s}") + raise click.ClickException(f"运行时出现错误: {e}\n{traceback.format_exc()}") diff --git a/astrbot/dashboard/server.py b/astrbot/dashboard/server.py index 5d6a78a6e..124291718 100644 --- a/astrbot/dashboard/server.py +++ b/astrbot/dashboard/server.py @@ -25,7 +25,7 @@ class AstrBotDashboard: ) -> None: self.core_lifecycle = core_lifecycle self.config = core_lifecycle.astrbot_config - self.data_path = os.path.abspath(os.path.join(get_astrbot_data_path, "dist")) + self.data_path = os.path.abspath(os.path.join(get_astrbot_data_path(), "dist")) self.app = Quart("dashboard", static_folder=self.data_path, static_url_path="/") self.app.config["MAX_CONTENT_LENGTH"] = ( 128 * 1024 * 1024