TDK1969 / nonebot_plugin_bilibilibot

基于Nonebot的bilibili通知插件,可将up主,主播以及番剧的更新/直播动态推送到QQ
GNU General Public License v3.0
98 stars 7 forks source link

无法载入依赖的nonebot_plugin_apscheduler插件 #8

Closed N1142 closed 2 years ago

N1142 commented 2 years ago

05-17 23:48:20 [ERROR] nonebot | Failed to import "nonebot_plugin_apscheduler" Traceback (most recent call last): File "d:\bot\mashuroom\bot.py", line 29, in nonebot.load_plugin('nonebot_plugin_bilibilibot') File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\load.py", line 28, in load_plugin return manager.load_plugin(module_path) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 104, in load_plugin module = importlib.import_module(name) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 194, in exec_module super().exec_module(module) File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot_plugin_bilibilibot__init__.py", line 319, in scheduler = require("nonebot_plugin_apscheduler").scheduler File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\load.py", line 163, in require plugin = load_plugin(name) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\load.py", line 28, in load_plugin return manager.load_plugin(module_path)

File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 104, in load_plugin module = importlib.import_module(name) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 194, in exec_module super().exec_module(module) File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot_plugin_apscheduler__init.py", line 11, in plugin_config = Config(**global_config.dict()) File "pydantic\env_settings.py", line 38, in pydantic.env_settings.BaseSettings.init super().init( File "pydantic\main.py", line 331, in pydantic.main.BaseModel.init__ raise validation_error pydantic.error_wrappers.ValidationError: 1 validation error for Config apscheduler_log_level value is not a valid integer (type=type_error.integer) 05-17 23:48:20 [ERROR] nonebot | Failed to import "nonebot_plugin_bilibilibot" Traceback (most recent call last): File "d:\bot\mashuroom\bot.py", line 29, in nonebot.load_plugin('nonebot_plugin_bilibilibot') File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\load.py", line 28, in load_plugin return manager.load_plugin(module_path) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 104, in load_plugin module = importlib.import_module(name) File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\manager.py", line 194, in exec_module super().exec_module(module) File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot_plugin_bilibilibot\init__.py", line 319, in scheduler = require("nonebot_plugin_apscheduler").scheduler File "C:\Users\DELL\AppData\Local\Programs\Python\Python38\lib\site-packages\nonebot\plugin\load.py", line 165, in require raise RuntimeError(f'Cannot load plugin "{name}"!') RuntimeError: Cannot load plugin "nonebot_plugin_apscheduler"!

TDK1969 commented 2 years ago

个人猜测是没有开启debug模式,参见此处,导致log level中出现非法整数

TDK1969 commented 2 years ago

你是否有修改过nonebot_plugin_aspcheduler中的内容?或者在.env文件中对变量apscheduler_log_level进行了赋值?

N1142 commented 2 years ago

你是否有修改过nonebot_plugin_aspcheduler中的内容?或者在.env文件中对变量apscheduler_log_level进行了赋值?

[有改过,现在已经删除了,现在nonebot_plugin_aspcheduler插件应该没有问题了,但您的插件在接受消息的时候出现了字符编码解码错误的问题 D%}~TWQ~57S~6$WX4KPIXJG

TDK1969 commented 2 years ago

这个是我上一个版本更新时在pypi上更新失误所遗留下来的问题,现在已经重新更新了

N1142 commented 2 years ago

这个是我上一个版本更新时在pypi上更新失误所遗留下来的问题,现在已经重新更新了

好,绝赞等更新惹