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