CMHopeSunshine / LittlePaimon

小派蒙!基于Nonebot2的原神机器人,包括但不限于UID面板查询、抽卡记录分析、游戏攻略图鉴、实时便签、原石札记、群聊学习、群管等功能。/ LittlePamon! Genshin Impact multifunctional bot based on Nonebot2.
https://docs.paimon.cherishmoon.top
GNU Affero General Public License v3.0
1.15k stars 127 forks source link

新插件amis出错 #315

Closed mawMOBai closed 1 year ago

mawMOBai commented 1 year ago

刚更新以后,运行poetry run nb run提示未找到模块amis,安装后启动依旧报错 `[root@VM-16-2-centos LittlePaimon]# poetry run pip install amis Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting amis Downloading https://pypi.tuna.tsinghua.edu.cn/packages/11/ce/4ec9a5a291299b37ebf3d663d245df681c8cbcc2a520eb612915c52f0dd9/amis-0.1.1-py3-none-any.whl (37 kB) Requirement already satisfied: pydantic>=1.6.2 in /root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages (from amis) (1.9.2) Requirement already satisfied: ujson>=4.0.1 in /root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages (from amis) (5.4.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in /root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages (from pydantic>=1.6.2->amis) (4.3.0) Installing collected packages: amis Successfully installed amis-0.1.1

[notice] A new release of pip available: 22.2.2 -> 22.3 [notice] To update, run: pip install --upgrade pip [root@VM-16-2-centos LittlePaimon]# poetry run pip install --upgrade pip Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Requirement already satisfied: pip in /root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages (22.2.2) Collecting pip Downloading https://pypi.tuna.tsinghua.edu.cn/packages/47/ef/8b5470b5b94b36231ed9c0bde90caa71c0d4322d4a15f009b2b7f4287fe0/pip-22.3-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 2.6 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.2.2 Uninstalling pip-22.2.2: Successfully uninstalled pip-22.2.2 Successfully installed pip-22.3 [root@VM-16-2-centos LittlePaimon]# poetry run nb run 10-26 12:40:08 [SUCCESS] nonebot | NoneBot is initializing... 10-26 12:40:08 [INFO] nonebot | Current Env: prod 10-26 12:40:08 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_couplets" 10-26 12:40:08 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_apscheduler" 10-26 12:40:08 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_myb_exchange" 10-26 12:40:09 [SUCCESS] nonebot | Succeeded to import "LittlePaimon.manager.bot_manager" 10-26 12:40:10 [SUCCESS] nonebot | Succeeded to import "LittlePaimon.manager.plugin_manager" 10-26 12:40:10 [SUCCESS] nonebot | Succeeded to import "LittlePaimon.manager.database_manager" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "LittlePaimon.manager.alias_manager" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "nonebot_plugin_htmlrender" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "Genshin_Calendar" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "tools" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "Paimon_Autobbs" 10-26 12:40:11 [SUCCESS] nonebot | Succeeded to import "Paimon_Gacha" 10-26 12:40:13 [SUCCESS] nonebot | Succeeded to import "Learning_Chat" 10-26 12:40:13 [SUCCESS] nonebot | Succeeded to import "Paimon_Info" 10-26 12:40:13 [SUCCESS] nonebot | Succeeded to import "Genshin_Voice" 10-26 12:40:14 [SUCCESS] nonebot | Succeeded to import "Paimon_Abyss" 10-26 12:40:14 [SUCCESS] nonebot | Succeeded to import "Paimon_Gacha_Log" 10-26 12:40:14 [SUCCESS] nonebot | Succeeded to import "news60s" 10-26 12:40:16 [SUCCESS] nonebot | Succeeded to import "Paimon_Wiki" 10-26 12:40:16 [SUCCESS] nonebot | Succeeded to import "NoticeAndRequest" 10-26 12:40:16 [SUCCESS] nonebot | Succeeded to import "Paimon_CloudGenshin" 10-26 12:40:17 [SUCCESS] nonebot | Succeeded to import "Mihoyo_bbs" 10-26 12:40:17 [SUCCESS] nonebot | Succeeded to import "Paimon_DailyNote" 10-26 12:40:17 [SUCCESS] nonebot | Succeeded to import "Paimon_MonthInfo" 10-26 12:40:17 [SUCCESS] nonebot | Succeeded to import "Paimon_Bind" 10-26 12:40:17 [SUCCESS] nonebot | Succeeded to import "LittlePaimon" 10-26 12:40:17 [SUCCESS] nonebot | Running NoneBot... 10-26 12:40:17 [INFO] uvicorn | Started server process [31417] 10-26 12:40:17 [INFO] uvicorn | Waiting for application startup. 10-26 12:40:17 [INFO] nonebot_plugin_apscheduler | Scheduler Started 10-26 12:40:17 [INFO] LittlePaimon | ██╗ ██╗████████╗████████╗██╗ ███████╗ ██████╗ █████╗ ██╗███╗ ███╗ ██████╗ ███╗ ██╗ ██║ ██║╚══██╔══╝╚══██╔══╝██║ ██╔════╝ ██╔══██╗██╔══██╗██║████╗ ████║██╔═══██╗████╗ ██║ ██║ ██║ ██║ ██║ ██║ █████╗ ██████╔╝███████║██║██╔████╔██║██║ ██║██╔██╗ ██║ ██║ ██║ ██║ ██║ ██║ ██╔══╝ ██╔═══╝ ██╔══██║██║██║╚██╔╝██║██║ ██║██║╚██╗██║ ███████╗██║ ██║ ██║ ███████╗███████╗ ██║ ██║ ██║██║██║ ╚═╝ ██║╚██████╔╝██║ ╚████║ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ 10-26 12:40:17 [SUCCESS] LittlePaimon | [数据库]连接成功 10-26 12:40:18 [ERROR] uvicorn | Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 635, in lifespan async with self.lifespan_context(app): File "/root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 530, in aenter await self._router.startup() File "/root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 612, in startup await handler() File "/root/ys/LittlePaimon/./LittlePaimon/init.py", line 36, in startup from LittlePaimon import web File "/root/ys/LittlePaimon/./LittlePaimon/web/init.py", line 5, in from .pages import admin_app, login_page, bind_cookie_page, blank_page File "/root/ys/LittlePaimon/./LittlePaimon/web/pages/init.py", line 1, in from .main import admin_app, blank_page File "/root/ys/LittlePaimon/./LittlePaimon/web/pages/main.py", line 2, in from amis import App, PageSchema, Tpl, Page, DropDownButton, ActionType, LevelEnum, Flex ImportError: cannot import name 'DropDownButton' from 'amis' (/root/.cache/pypoetry/virtualenvs/littlepaimon-1l4Lsu0u-py3.9/lib/python3.9/site-packages/amis/init.py)

10-26 12:40:18 [ERROR] uvicorn | Application startup failed. Exiting. `

CMHopeSunshine commented 1 year ago

是叫amis-python,不是amis,把amis卸载了amis-python吧,另外还有一个新库叫python-jose,不叫jose

MotocoZg commented 1 year ago

是叫amis-python,不是amis,把amis卸载了amis-python吧,另外还有一个新库叫python-jose,不叫jose

所以这个无法启动的问题怎么解决?

CMHopeSunshine commented 1 year ago

不是说了吗,卸载amis,安装amis-python,重启

QAQQL commented 1 year ago

pip install amis-python -U