CMHopeSunshine / nonebot-plugin-learning-chat

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

启动报错 AttributeError: type object 'Item' has no attribute 'ListBodyField' #40

Closed adios-amigos closed 1 year ago

adios-amigos commented 1 year ago

06-25 16:27:00 [ERROR] nonebot | Failed to import "nonebot_plugin_learning_chat" Traceback (most recent call last): File "G:\robot\bot\Murasame\bot.py", line 14, in nonebot.load_from_toml("pyproject.toml") File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot\plugin\load.py", line 125, in load_from_toml return load_all_plugins(plugins, plugin_dirs) File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot\plugin\load.py", line 62, in load_all_plugins return manager.load_all_plugins() File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins return set( File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot\plugin\manager.py", line 176, in filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot\plugin\manager.py", line 141, in load_plugin module = importlib.import_module(name) File "C:\Users\Administrator\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 "G:\robot\bot\Murasame.venv\lib\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 "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot_plugin_learning_chat\init__.py", line 14, in from . import web_api, web_page File "G:\robot\bot\Murasame.venv\lib\site-packages\nonebot_plugin_learning_chat\web_api.py", line 19, in from .web_page import login_page, admin_app File "G:\robot\bot\Murasame.venv\lib\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' 上个版本使用正常,更新后出现此报错,请问如何解决。

CMHopeSunshine commented 1 year ago

更新到最新版

adios-amigos commented 1 year ago

已升级到0.2.3版本,仍出现此错误

CMHopeSunshine commented 1 year ago

那就升级一下amis-python的版本 pip install amis-python -U

adios-amigos commented 1 year ago

升级完amis-python能够正常运行了,谢谢大佬