-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Plugin Version
Next-2.0.0
AstrBot Version
v4.17.5
Database Type
MySQL
Operating System
Windows
Bug Description
插件启动报错提示No module named 'wsgiref.simple_server', gbk codec can't encode
Steps to Reproduce
1.打开astrbot(或者重启插件)
2.查看日志
Expected Behavior
正确读取wsgiref.simple_server模块,解决 gbk codec can't encode
Error Logs
[2026-02-24 01:26:17.986] [Core] [INFO] [star.star_manager:461]: 正在载入插件 astrbot_plugin_meme_manager ...
[2026-02-24 01:26:18.159] [Core] [INFO] [star.star_manager:514]: Plugin meme_manager (v3.19) by anka: anka - 表情包管理器 Astrbot表情包管理器3.0版本已发布! 提供便捷的 WebUI 管理界面(/表情管理 开启管理后台) , 所有 prompt 会根据修改的表情包文件夹目录自动维护,无需手动添加!可以控制每次发送的表情数量和频率(进入设置配置一次发送最大数量与发送概率) 更多信息与功能预览请前往仓库页面查看:https://github.com/anka-afk/astrbot_plugin_meme_manager
[2026-02-24 01:26:18.163] [Core] [INFO] [star.star_manager:461]: 正在载入插件 astrbot_plugin_self_learning ...
[2026-02-24 01:26:18.224] [Core] [INFO] [star.star_manager:514]: Plugin astrbot_plugin_self_learning (Next-2.0.0) by NickMo: SELF LEARNING 自主学习插件 — 让 AI 聊天机器人自主学习对话风格、理解群组黑话、管理社交关系与好感度、自适应人格演化,像真人一样自然对话。(使用前必须手动备份人格数据)
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.main:66]: 使用用户自定义数据路径 (从Storage_Settings.data_dir): ./data/self_learning_data
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.main:76]: 最终插件数据目录: C:\Users\Administrator\.astrbot\data\self_learning_data
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.config:206]: [配置加载] Model_Configuration原始数据: {'filter_provider_id': None, 'refine_provider_id': None, 'reinforce_provider_id': None}
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.config:207]: [配置加载] filter_provider_id: None
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.config:208]: [配置加载] refine_provider_id: None
[2026-02-24 01:26:18.225] [Core] [INFO] [astrbot_plugin_self_learning.config:209]: [配置加载] reinforce_provider_id: None
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.config:228]: [配置加载] Goal_Driven_Chat_Settings原始数据: {'enable_goal_driven_chat': False, 'goal_session_timeout_hours': 24, 'goal_auto_detect': True, 'goal_max_conversation_history': 40}
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.config:229]: [配置加载] enable_goal_driven_chat: False
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.main:79]: [插件初始化] Provider配置已加载:
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.main:80]: - filter_provider_id: None
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.main:81]: - refine_provider_id: None
[2026-02-24 01:26:18.226] [Core] [INFO] [astrbot_plugin_self_learning.main:82]: - reinforce_provider_id: None
[2026-02-24 01:26:18.364] [Core] [INFO] [core.patterns:320]: 注册服务: database_manager
[2026-02-24 01:26:18.364] [Core] [INFO] [core.factory:252]: 创建数据库管理器成功 (实现: SQLAlchemyDatabaseManager)
[2026-02-24 01:26:18.403] [Core] [ERRO] [v4.17.5] [core.factory:112]: 导入消息收集器失败: No module named 'wsgiref.simple_server'
Traceback (most recent call last):
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\core\factory.py", line 103, in create_message_collector
from ..services.core_learning import MessageCollectorService
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\core_learning\__init__.py", line 5, in <module>
from .v2_learning_integration import V2LearningIntegration
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\core_learning\v2_learning_integration.py", line 38, in <module>
from ..monitoring.instrumentation import monitored
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\monitoring\__init__.py", line 17, in <module>
from .metrics import (
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\monitoring\metrics.py", line 32, in <module>
from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram
File "C:\Users\Administrator\.astrbot\data\site-packages\prometheus_client\__init__.py", line 3, in <module>
from . import (
File "C:\Users\Administrator\.astrbot\data\site-packages\prometheus_client\exposition.py", line 43, in <module>
from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer
ModuleNotFoundError: No module named 'wsgiref.simple_server'
[2026-02-24 01:26:18.412] [Core] [ERRO] [v4.17.5] [core.plugin_lifecycle:255]: 自学习服务初始化失败: 创建消息收集器失败: No module named 'wsgiref.simple_server'
[2026-02-24 01:26:18.412] [Core] [ERRO] [v4.17.5] [astrbot_plugin_self_learning.main:121]: 插件服务编排失败,部分功能将不可用: 创建消息收集器失败: No module named 'wsgiref.simple_server'
Traceback (most recent call last):
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\core\factory.py", line 103, in create_message_collector
from ..services.core_learning import MessageCollectorService
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\core_learning\__init__.py", line 5, in <module>
from .v2_learning_integration import V2LearningIntegration
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\core_learning\v2_learning_integration.py", line 38, in <module>
from ..monitoring.instrumentation import monitored
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\monitoring\__init__.py", line 17, in <module>
from .metrics import (
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\services\monitoring\metrics.py", line 32, in <module>
from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram
File "C:\Users\Administrator\.astrbot\data\site-packages\prometheus_client\__init__.py", line 3, in <module>
from . import (
File "C:\Users\Administrator\.astrbot\data\site-packages\prometheus_client\exposition.py", line 43, in <module>
from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer
ModuleNotFoundError: No module named 'wsgiref.simple_server'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\main.py", line 117, in __init__
self._lifecycle.bootstrap(
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\core\plugin_lifecycle.py", line 51, in bootstrap
p.message_collector = p.service_factory.create_message_collector()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\core\factory.py", line 34, in wrapper
result = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\.astrbot\data\plugins\astrbot_plugin_self_learning\core\factory.py", line 113, in create_message_collector
raise ServiceError(f"创建消息收集器失败: {str(e)}")
data.plugins.astrbot_plugin_self_learning.exceptions.ServiceError: 创建消息收集器失败: No module named 'wsgiref.simple_server'
[2026-02-24 01:26:18.419] [Core] [INFO] [astrbot_plugin_self_learning.main:125]: 自学习插件初始化完成
[2026-02-24 01:26:18.419] [Core] [INFO] [core.plugin_lifecycle:308]: 开始执行 on_load 方法
[2026-02-24 01:26:18.419] [Core] [INFO] [core.plugin_lifecycle:317]: 尝试启动数据库管理器 (第 1/3 次)
[2026-02-24 01:26:18.420] [Core] [INFO] [database.sqlalchemy_database_manager:66]: [DomainRouter] 开始启动…
[2026-02-24 01:26:18.420] [Core] [INFO] [database.engine:61]: [DatabaseEngine] 数据库引擎初始化成功
[2026-02-24 01:26:18.420] [Core] [INFO] [database.sqlalchemy_database_manager:74]: [DomainRouter] 数据库引擎已创建
[2026-02-24 01:26:18.468] [Core] [INFO] [database.engine:232]: [DatabaseEngine] 数据库表结构同步完成
[2026-02-24 01:26:18.560] [Core] [INFO] [database.sqlalchemy_database_manager:131]: [DomainRouter] 11 个领域 Facade 已初始化
[2026-02-24 01:26:18.560] [Core] [INFO] [database.sqlalchemy_database_manager:82]: [DomainRouter] 数据库启动成功
[2026-02-24 01:26:18.560] [Core] [INFO] [core.plugin_lifecycle:320]: 数据库管理器启动完成
[2026-02-24 01:26:18.560] [Core] [INFO] [core.plugin_lifecycle:374]: 自学习插件加载完成Relevant Configuration
Additional Context
系统环境存在wsgiref
astrbot环境存在wsgiref
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed