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> #403

Closed Speechless22 closed 1 year ago

Speechless22 commented 1 year ago

问题

执行poetry install后出现警告:Warning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies.Run poetry lock [--no-update] to fix it. 随后执行poetry lock无警告/报错 最后再执行poetry install提示No dependencies to install or update 随后python3 main.py时提示依赖报错,似乎lock里的依赖项并未安装 附图 image

如何复现

No response

预期行为

No response

使用环境

- 系统: Ubuntu 22.04.1 LTS
- mirai 版本: 
- mirai-api-http 版本: 
- Python 版本: 3.10.6
- 源码版本: 最新
- 其他 Graia 库版本:
- 其他 有关 库版本:

日志/截图

No response

nullqwertyuiop commented 1 year ago

poetry run python main.py

Speechless22 commented 1 year ago

启动后有一个报错 `2023-02-14 09:38:10.708 | ERROR | core:install_modules:258 - Traceback (most recent call last):

File "/home/ubuntu/Production/sagiri-bot/main.py", line 110, in core.install_modules(Path("modules") / "self_contained") │ │ └ <class 'pathlib.Path'> │ └ <staticmethod(<function Sagiri.install_modules at 0xffff7e66bf40>)> └ <core.Sagiri object at 0xffff7e6727d0>

File "/home/ubuntu/Production/sagiri-bot/core/init.py", line 252, in install_modules saya.require(f"{module_base_path}.{module}") │ └ <function Saya.require at 0xffff7f64d870> └ <graia.saya.Saya object at 0xffff7e672620>

File "/home/ubuntu/.cache/pypoetry/virtualenvs/sagiri-bot-AVwYQ3_2-py3.10/lib/python3.10/site-packages/graia/saya/init.py", line 118, in require channel = self.require_resolve(module) │ │ └ 'modules.self_contained.chat_gpt' │ └ <function Saya.require_resolve at 0xffff7f64d750> └ <graia.saya.Saya object at 0xffff7e672620> File "/home/ubuntu/.cache/pypoetry/virtualenvs/sagiri-bot-AVwYQ3_2-py3.10/lib/python3.10/site-packages/graia/saya/init.py", line 76, in require_resolve imported_module = importlib.import_module(module, module) │ │ │ └ 'modules.self_contained.chat_gpt' │ │ └ 'modules.self_contained.chat_gpt' │ └ <function import_module at 0xffff80650af0> └ <module 'importlib' from '/usr/lib/python3.10/importlib/init.py'> File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) │ │ │ │ │ └ 0 │ │ │ │ └ 'modules.self_contained.chat_gpt' │ │ │ └ 0 │ │ └ 'modules.self_contained.chat_gpt' │ └ <function _gcd_import at 0xffff8076f400> └ <module '_frozen_importlib' (frozen)> 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 "", line 883, in exec_module File "", line 241, in _call_with_frames_removed

File "/home/ubuntu/Production/sagiri-bot/modules/self_contained/chat_gpt/init.py", line 16, in from .conversation_manager import ConversationManager

File "/home/ubuntu/Production/sagiri-bot/modules/self_contained/chat_gpt/conversation_manager.py", line 17, in email = configs.get("email") └ None

AttributeError: 'NoneType' object has no attribute 'get'` 发出的图片中缺少字体

nullqwertyuiop commented 1 year ago
  1. 报错正常,将在后续更新中移除该模块
  2. 检查系统中是否安装对应字体