SAGIRI-kawaii / sagiri-bot

基于Graia Ariadne和Mirai的QQ机器人 SAGIRI-BOT
GNU Affero General Public License v3.0
696 stars 83 forks source link

[Bug Report]机器人无法正常启动 #282

Closed 0x0129 closed 2 years ago

0x0129 commented 2 years ago

问题 输入python main.py时报错

如何复现 输入python main.py

预期行为 不清楚

使用环境:

日志/截图 root@ecs-BWtJt:/sagiri-bot# python main.py Traceback (most recent call last): File "/BOT/sagiri-bot/main.py", line 8, in <module> from creart import create File "/root/miniconda3/lib/python3.9/site-packages/creart/__init__.py", line 102, in <module> _env_scan() File "/root/miniconda3/lib/python3.9/site-packages/creart/__init__.py", line 24, in _env_scan creator = entry.load() File "/root/miniconda3/lib/python3.9/importlib/metadata.py", line 86, in load module = import_module(match.group('module')) File "/root/miniconda3/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/__init__.py", line 8, in <module> from .app import Ariadne as Ariadne # noqa: F401 File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/app.py", line 35, in <module> from .connection import ConnectionInterface File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/connection/__init__.py", line 22, in <module> from ..event import MiraiEvent File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/event/__init__.py", line 5, in <module> from ..dispatcher import BaseDispatcher File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/dispatcher.py", line 12, in <module> from .message.chain import MessageChain File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/message/chain.py", line 25, in <module> from .element import ( File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/message/element.py", line 17, in <module> from ..connection.util import UploadMethod File "/root/miniconda3/lib/python3.9/site-packages/graia/ariadne/connection/util.py", line 33, in <module> from graia.amnesia.builtins.starlette import StarletteRouter File "/root/miniconda3/lib/python3.9/site-packages/graia/amnesia/builtins/starlette.py", line 166, in <module> class StarletteRouter(AbstractRouter["StarletteService", str, StarletteRequestIO | StarletteWebsocketIO]): TypeError: unsupported operand type(s) for |: 'ABCMeta' and 'ABCMeta' root@ecs-BWtJt:/sagiri-bot#

0x0129 commented 2 years ago

具体截图:https://d.xzai.cloud/d/Onedrive/Snipaste_2022-08-08_01-50-02.png

0x0129 commented 2 years ago

所有部署都是按照Docs的步骤 用的服务器,重装过系统才搞的

SAGIRI-kawaii commented 2 years ago

amnesia 未限定 Python 版本,库中使用了 Python3.10+ 的特性,等待库更新或升级到 Python3.10+

0x0129 commented 2 years ago

3.10可以吗?

SAGIRI-kawaii commented 2 years ago

按理说可以

0x0129 commented 2 years ago

按理说可以

我试试

0x0129 commented 2 years ago

那我之前的3.9需要卸载吗?

SAGIRI-kawaii commented 2 years ago

看你自己