[Bug] 添加了bocha web_searcher 在使用过程中报错
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start at backend/app/astrbot/builtin_stars/web_searcher/main.py, especially the readability import, then inspect the project's dependency declarations and packaging for the web_searcher plugin. Reproduce the Windows startup path and verify that lxml.html is available and the web_searcher plugin loads without the ModuleNotFoundError.
Written by the indexing model from the issue text.
Description
What happened / 发生了什么
在完成astrbot配置,在使用过程中配置了 web_searcher API。但在AI运行过程中进行了报错
Reproduce / 如何复现?
似乎在配置了bocha API后一直都不太能正常使用
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
4.20.1
OS
Windows
Logs / 报错日志
[2026-03-18 18:09:13.245] [Core] [INFO] [star.star_manager:744]: 正在载入插件 web_searcher ...
[2026-03-18 18:09:13.307] [Core] [ERRO] [v4.20.1] [star.star_manager:756]: Traceback (most recent call last):
File "\?\C:\AIAgent\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 342, in import_plugin_with_dependency_recovery
return import(path, fromlist=[module_str])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\C:\AIAgent\AstrBot\backend\app\astrbot\builtin_stars\web_searcher\main.py", line 8, in
from readability import Document
File "C:\AIAgent\AstrBot\backend\python\Lib\site-packages\readability_init.py", line 3, in
from .readability import Document
File "C:\AIAgent\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 "\?\C:\AIAgent\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 748, in load
module = await self._import_plugin_with_dependency_recovery(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\C:\AIAgent\AstrBot\backend\app\astrbot\core\star\star_manager.py", line 363, in import_plugin_with_dependency_recovery
return import(path, fromlist=[module_str])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\?\C:\AIAgent\AstrBot\backend\app\astrbot\builtin_stars\web_searcher\main.py", line 8, in
from readability import Document
File "C:\AIAgent\AstrBot\backend\python\Lib\site-packages\readability_init.py", line 3, in
from .readability import Document
File "C:\AIAgent\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-03-18 18:09:13.308] [Core] [ERRO] [v4.20.1] [star.star_manager:757]: 插件 web_searcher 导入失败。原因:No module named 'lxml.html'
Are you willing to submit a PR? / 你愿意提交 PR 吗?
- Yes!
Code of Conduct
- I have read and agree to abide by the project's Code of Conduct。
- Dominant language
- Python
- Stars
- 40.7k
- Forks
- 2.9k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 112
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AstrBotDevs/AstrBot
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AstrBotDevs/AstrBot#10033 · 3 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AstrBotDevs/AstrBot#9999 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AstrBotDevs/AstrBot#9945 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AstrBotDevs/AstrBot#9938 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
AstrBotDevs/AstrBot#9929 · 2 comments ·
All issues in AstrBotDevs/AstrBot
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100