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] <title>无法启动机器人 #406

Closed Zzx108 closed 1 year ago

Zzx108 commented 1 year ago

问题

在使用命令启动机器人时报错 第一次写这个...我看上一个人也是这个,但是我还是没有解决

如何复现

1.使用环境:Windows Server 2022 python:3.10.10 git:2.39.2 2.poetry shell → python main.py 3.报错:未检测到git name 'Repo' is not defined 4.尝试使用 poetry run python main.py 运行。依然报错 5.git根据网上教程配置了环境变量,是克隆的,并且git pull正常。

预期行为

No response

日志/截图

PS C:\Users\Administrator\Desktop\Zzx\sagiri-bot> poetry run python main.py 2023-02-19 21:16:52.198 | ERROR | shared.utils.self_upgrade::16 - 未检测到git! Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Zzx\sagiri-bot\main.py", line 31, in from core import Sagiri File "C:\Users\Administrator\Desktop\Zzx\sagiri-bot\core__init__.py", line 47, in from shared.utils.self_upgrade import UpdaterService File "C:\Users\Administrator\Desktop\Zzx\sagiri-bot\shared\utils\self_upgrade.py", line 23, in def get_current_repo() -> Repo | None: NameError: name 'Repo' is not defined. Did you mean: 'repr'?

nullqwertyuiop commented 1 year ago

由报错推测为 GitPython 未正常安装,请运行 poetry show GitPython 并附上输出内容,谢谢。

Zzx108 commented 1 year ago

由报错推测为 GitPython 未正常安装,请运行 poetry show GitPython 并附上输出内容,谢谢。 你好,输出内容如下 name : gitpython version : 3.1.30 description : GitPython is a python library used to interact with Git repositories

dependencies