Skip to content

[Bug] #7717

@mikutetogumi-jpg

Description

@mikutetogumi-jpg

What happened / 发生了什么

astrbot自带的websearch功能会在有的时候突然发癫无法加载,例如打开astrbot时就会报错找不到lxml.html

Reproduce / 如何复现?

有时候正常启动astrbot就会这样

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

4,23,2 Windows Docker Desktop deepdeek-chat aiocqhttp_default

OS

Windows

Logs / 报错日志

[2026-04-22 09:11:53.215] [Core] [INFO] [star.star_manager:877]: 正在载入插件 web_searcher ...
[2026-04-22 09:11:53.219] [Core] [ERRO] [v4.23.2] [star.star_manager:890]: Traceback (most recent call last):
File "\?\F:\qqbot\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 433, in import_plugin_with_dependency_recovery
return import(path, fromlist=[module_str])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\F:\qqbot\AstrBot\backend\app\astrbot\builtin_stars\web_searcher\main.py", line 8, in
from readability import Document
File "F:\qqbot\AstrBot\backend\python\Lib\site-packages\readability_init
.py", line 3, in
from .readability import Document
File "F:\qqbot\AstrBot\backend\python\Lib\site-packages\readability\readability.py", line 12, in
from lxml.html import document_fromstring
ModuleNotFoundError: No module named 'lxml.html'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "\?\F:\qqbot\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 881, in load
module = await self._import_plugin_with_dependency_recovery(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\F:\qqbot\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 459, in import_plugin_with_dependency_recovery
return import(path, fromlist=[module_str])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\F:\qqbot\AstrBot\backend\app\astrbot\builtin_stars\web_searcher\main.py", line 8, in
from readability import Document
File "F:\qqbot\AstrBot\backend\python\Lib\site-packages\readability_init
.py", line 3, in
from .readability import Document
File "F:\qqbot\AstrBot\backend\python\Lib\site-packages\readability\readability.py", line 12, in
from lxml.html import document_fromstring
ModuleNotFoundError: No module named 'lxml.html'
[2026-04-22 09:11:53.219] [Core] [ERRO] [v4.23.2] [star.star_manager:891]: 插件 web_searcher 导入失败。原因:No module named 'lxml.html'

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions