TDK1969 / nonebot_plugin_bilibilibot

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

插件加载出错 #43

Closed ElainaFanBoy closed 1 year ago

ElainaFanBoy commented 1 year ago

[ERROR] nonebot | Failed to import "nonebot_plugin_bilibilibot" Traceback (most recent call last): File "D:\Desktop\0\software\wbushu\Bot\IRONY\bot.py", line 26, in nonebot.load_plugins("src/plugins") File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\site-packages\nonebot\plugin\load.py", line 48, in load_plugins return manager.load_all_plugins() File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\site-packages\nonebot\plugin\manager.py", line 175, in load_all_plugins return set( File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\site-packages\nonebot\plugin\manager.py", line 176, in filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\site-packages\nonebot\plugin\manager.py", line 145, in load_plugin module = importlib.import_module( File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\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 "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\site-packages\nonebot\plugin\manager.py", line 240, in exec_module super().exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "D:\Desktop\0\software\wbushu\Bot\IRONY\src\plugins\nonebot_plugin_bilibilibot__init__.py", line 13, in from .bili_src.biliStream import * File "D:\Desktop\0\software\wbushu\Bot\IRONY\src\plugins\nonebot_plugin_bilibilibot\bili_src\biliStream.py", line 10, in from .bili_client import bili_client File "D:\Desktop\0\software\wbushu\Bot\IRONY\src\plugins\nonebot_plugin_bilibilibot\bili_src\bili_client.py", line 749, in bili_client = BiliClient() File "D:\Desktop\0\software\wbushu\Bot\IRONY\src\plugins\nonebot_plugin_bilibilibot\bili_src\bili_client.py", line 83, in init self.proxy_lock = asyncio.Lock() File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\asyncio\locks.py", line 81, in init__ self._loop = events.get_event_loop() File "D:\Desktop\0\software\wbushu\Bot\IRONY\env\lib\asyncio\events.py", line 642, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' RuntimeError: There is no current event loop in thread 'MainThread'.

TDK1969 commented 1 year ago

请将bili_src/bili_client.py中第83行的

self.proxy_lock = asyncio.Lock()

注释掉即可

ElainaFanBoy commented 1 year ago

请将bili_src/bili_client.py中第83行的

self.proxy_lock = asyncio.Lock()

注释掉即可

可以了,辛苦