|
|
@@ -25,11 +25,18 @@ class ConfigHandler:
|
|
|
# 配置文件路径
|
|
|
config_file = os.path.join(current_dir, '..', 'config', 'config.ini')
|
|
|
|
|
|
+ # 规范化路径
|
|
|
+ config_file = os.path.abspath(config_file)
|
|
|
+
|
|
|
# 确保路径存在
|
|
|
if os.path.exists(config_file):
|
|
|
self.config.read(config_file, encoding='utf-8')
|
|
|
logger.info(f"✅ 配置文件加载成功: {config_file}")
|
|
|
logger.info(f"加载的节: {self.config.sections()}")
|
|
|
+
|
|
|
+ # 调试: 打印每个section的所有选项
|
|
|
+ for section in self.config.sections():
|
|
|
+ logger.info(f"Section [{section}] 的选项: {self.config.options(section)}")
|
|
|
else:
|
|
|
logger.warning(f"⚠️ 配置文件未找到: {config_file}")
|
|
|
|