HibiKier / zhenxun_bot

基于 Nonebot2 开发,非常可爱的绪山真寻bot
GNU Affero General Public License v3.0
3.39k stars 602 forks source link

更新到0.0.2-x以后出现的admin_bot_manage问题 #27

Closed sakuno214 closed 3 years ago

sakuno214 commented 3 years ago

08-11 16:20:28 [ERROR] nonebot | Failed to import "admin_bot_manage" Traceback (most recent call last): File "C:\zhenxun_bot\bot.py", line 12, in nonebot.load_plugins("plugins") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin__init__.py", line 981, in load_plugins result = context.run(_load_plugin, manager, plugin_name)

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin__init.py", line 929, in _load_plugin module = manager.load_plugin(plugin_name) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 154, in load_plugin return importlib.import_module(f"{self.namespace}.{name}") File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\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 "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\plugin\manager.py", line 221, in exec_module super().exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "C:\zhenxun_bot\plugins\admin_bot_manage\init.py", line 10, in export = export() TypeError: call__() missing 1 required positional argument: 'func'

OS windows server 2019

HibiKier commented 3 years ago

nonebot2版本是?

sakuno214 commented 3 years ago

nonebot2版本是?

2.0.0a13-post1

HibiKier commented 3 years ago

无法复现,试试在admin_bot_manage文件夹下新建一个init.py

sakuno214 commented 3 years ago

无法复现,试试在admin_bot_manage文件夹下新建一个init.py

内容呢?总不能是个空文件吧

HibiKier commented 3 years ago

就是空文件啊

HibiKier commented 3 years ago

bot.py里已经用nonebot.load_plugins单独加载admin_bot_manage目录下的插件了

sakuno214 commented 3 years ago

就是空文件啊

还有个问题,自己重新新建一个init文件以后,在群里使用[帮助]指令,控制台直接保错,私聊帮助又能正常触发,不知道是什么原因

大佬我还有个疑问,色图每日更新总是报以下错误,即使是我在img文件夹下新建rar文件夹都会报错

2021-08-14 04:31:07 更新 色图 完成,本地存在 100 张,实际更新 -133 张,以下为更新时未知错误: 更新色图 99.jpg 错误 <class 'FileNotFoundError'>: [Errno 2] No such file or directory: 'C:\zhenxun_bot\resources\img//rar/99.jpg'

HibiKier commented 3 years ago

第一个问题需要报错的截图,第二个问题会在下次更新完善