Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[问题]"Learning_Chat"报错 #447

Closed
YouYouLip opened this issue Jun 11, 2023 · 2 comments
Closed

[问题]"Learning_Chat"报错 #447

YouYouLip opened this issue Jun 11, 2023 · 2 comments
Labels
question Further information is requested

Comments

@YouYouLip
Copy link

YouYouLip commented Jun 11, 2023

确认

  • 我的Bot版本已更新到最新,且已尝试使用nb paimon install更新依赖库
  • 我已查阅文档-常见问题,无相关解决方案
  • 我已确认issue中没有类似的问题或仍然得不到解决

环境信息

  • 系统版本: Windows11(example)
  • Python版本: 3.9.10(example)
  • Nonebot2版本: 2.0.0rc4(example)

问题描述

06-12 01:43:17 [ERROR] nonebot | Failed to import "Learning_Chat"
Traceback (most recent call last):
File "D:\NoneBot-LingYin\LittlePaimon\bot.py", line 28, in
nonebot.load_plugin("LittlePaimon")
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\load.py", line 37, in load_plugin
return manager.load_plugin(module_path)
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "C:\Users\33034\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 240, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\NoneBot-LingYin\LittlePaimon\LittlePaimon_init
.py", line 46, in
load_plugins(str(Path(file).parent / 'plugins'))
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\load.py", line 48, in load_plugins
return manager.load_all_plugins()
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins
return set(
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 145, in load_plugin
module = importlib.import_module(
File "C:\Users\33034\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "D:\NoneBot-LingYin\LittlePaimon.venv\lib\site-packages\nonebot\plugin\manager.py", line 240, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "D:\NoneBot-LingYin\LittlePaimon\LittlePaimon\plugins\Learning_Chat_init
.py", line 16, in
from . import web_api, web_page
File "D:\NoneBot-LingYin\LittlePaimon\LittlePaimon\plugins\Learning_Chat\web_page.py", line 406, in
listItem=AmisList.Item(body=[AmisList.Item.ListBodyField(name="msg")]),
AttributeError: type object 'Item' has no attribute 'ListBodyField'
.

复现步骤[可选]

更新后出现的问题

@YouYouLip YouYouLip added the question Further information is requested label Jun 11, 2023
@YouYouLip YouYouLip changed the title [问题] [问题]"Learning_Chat"报错 Jun 11, 2023
@CMHopeSunshine
Copy link
Owner

更新版本(进入虚拟环境后) pip install amis-python -U

@YouYouLip
Copy link
Author

更新版本(进入虚拟环境后) pip install amis-python -U

谢谢 已解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants