Closed 12123ads closed 2 years ago
无法从中获得有效信息
请发送bot.py
文件和nonebot2的日志文件(可以使用折叠,它的代码是这样的)
<details>
<summary>折叠标题</summary>
内容
</details>
它的效果应该是这样
也可以使用Ubuntu Pastebin和Gist等来上传日志(提供链接)
请问nonebot2的日志文件是哪个
目前暂未适配nonebot2 beta1,请使用a16版:
pip install nonebot2==2.0.0a16
https://paste.ubuntu.com/p/FwsnDr3jBR/ 这样是启动成功了吗?
https://paste.ubuntu.com/p/FwsnDr3jBR/ 这样是启动成功了吗?
还没,在此项目新版本push上来前用python bot.py
进行启动以避规这个问题(之前push上来之后出了点显示问题所以revert了,因为考试就没管)
https://paste.ubuntu.com/p/56SzHZsDvh/ 用python3 bot.py启动,还是这样
https://paste.ubuntu.com/p/56SzHZsDvh/ 用python3 bot.py启动,还是这样
已经启动成功了 请尝试执行命令观察输出
还是没反应
我看你上边的日志,你的机器人设置了命令前缀,/开头才能识别成指令
ohhhhhhhhhhhhhhhhh终于可以了,谢谢
报错:
File "/usr/local/lib/python3.9/dist-packages/nonebot/plugin/load.py", line 49, in load_plugins return manager.load_all_plugins() File "/usr/local/lib/python3.9/dist-packages/nonebot/plugin/manager.py", line 110, in load_all_plugins return set( File "/usr/local/lib/python3.9/dist-packages/nonebot/plugin/manager.py", line 111, in
filter(None, (self.load_plugin(name) for name in self.list_plugins()))
File "/usr/local/lib/python3.9/dist-packages/nonebot/plugin/manager.py", line 96, in load_plugin
module = importlib.import_module(
File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "/usr/local/lib/python3.9/dist-packages/nonebot/plugin/manager.py", line 181, in exec_module
super().exec_module(module)
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/root/YSbot/Genshin_Impact_bot/gacha/init.py", line 4, in
from nonebot.adapters.cqhttp import GROUP_ADMIN, GROUP_OWNER
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/local/lib/python3.9/dist-packages/nonebot/adapters/cqhttp/init.py", line 14, in
from .permission import *
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "/usr/local/lib/python3.9/dist-packages/nonebot/adapters/cqhttp/permission.py", line 27, in
PRIVATE = Permission(_private)
File "/usr/local/lib/python3.9/dist-packages/nonebot/permission.py", line 68, in init
self.checkers: Set[Dependent[bool]] = set(
File "/usr/local/lib/python3.9/dist-packages/nonebot/permission.py", line 71, in
else Dependent[bool].parse(
File "/usr/local/lib/python3.9/dist-packages/nonebot/dependencies/init.py", line 114, in parse
signature = get_typed_signature(call)
File "/usr/local/lib/python3.9/dist-packages/nonebot/dependencies/utils.py", line 11, in get_typed_signature
typed_params = [
File "/usr/local/lib/python3.9/dist-packages/nonebot/dependencies/utils.py", line 16, in
annotation=get_typed_annotation(param, globalns),