CMHopeSunshine / nonebot-plugin-learning-chat

Nonebot2插件,让Bot学习群友的发言和表情包。/ Nonebot2 plugin to learn what your group members say.
GNU Affero General Public License v3.0
164 stars 5 forks source link

【启动报错】AttributeError : type object 'Item has noattribute 'ListBodyField!’ #43

Closed echo-xianyu closed 1 year ago

echo-xianyu commented 1 year ago

nb:2.0.0 amis-python:1.0.8.post2 系统:ubuntu22.04

以下是错误报告

07-09 02:16:04 [ERROR] nonebot | Failed to import "nonebot_plugin_learning_chat" Traceback (most recent call last): File "/root/echo_xianyu/bot.py", line 12, in nonebot.load_from_toml("pyproject.toml") File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/load.py", line 125, in load_from_toml return load_all_plugins(plugins, plugin_dirs) File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/load.py", line 62, in load_all_plugins return manager.load_all_plugins() File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 175, in load_all_plugins return set( File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 176, in filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin module = importlib.import_module(name) File "/usr/lib/python3.10/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 "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 241, in exec_module super().exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot_plugin_learning_chat/init.py", line 14, in from . import web_api, web_page File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot_plugin_learning_chat/web_api.py", line 19, in from .web_page import login_page, admin_app File "/root/echo_xianyu/.venv/lib/python3.10/site-packages/nonebot_plugin_learning_chat/web_page.py", line 493, in listItem=AmisList.Item(body=[AmisList.Item.ListBodyField(name="msg")]), AttributeError: type object 'Item' has no attribute 'ListBodyField'

尝试了其他issue中更新插件以及更新amis-python的方法均无用

CMHopeSunshine commented 1 year ago

source .venv/bin/activatepip show amis-python看看,感觉你虚拟环境里的没有更新

echo-xianyu commented 1 year ago

问题已经解决,感谢大佬