Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion astrbot/core/config/astrbot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ def __init__(
# Handle UTF-8 BOM if present
if conf_str.startswith("\ufeff"):
conf_str = conf_str[1:]
conf = json.loads(conf_str)
if not conf_str:
raise EnvironmentError(f'文件 {config_path} 为空, 请手动处理...')
Comment thread
IITII marked this conversation as resolved.
try:
conf = json.loads(conf_str)
except Exception as e:
logger.error(f'读取文件失败 {config_path}: {e}')
raise e
Comment thread
IITII marked this conversation as resolved.
Comment thread
IITII marked this conversation as resolved.
dashboard_conf = conf.get("dashboard")
legacy_dashboard_password_change_required = bool(
isinstance(dashboard_conf, dict)
Expand Down
Loading