HibiKier/nonebot_plugin_gamedraw

插件启动不了

KafCoppelia opened this issue · 0 comments

插件放在了src/plugins/下,通过pyproject.toml启动,
[nonebot.plugins] plugins = ["nonebot_plugin_gamedraw"] plugin_dirs = ["src/plugins"]
nb run启动时报错:
`12-23 13:18:58 [ERROR] nonebot | Failed to import "nonebot_plugin_gamedraw"
Traceback (most recent call last):
File "", line 1, in
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\multiprocessing\spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\multiprocessing\process.py", line 315, in _bootstrap
self.run()
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\multiprocessing\process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\uvicorn\subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\uvicorn\server.py", line 68, in run
return asyncio.run(self.serve(sockets=sockets))
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\asyncio\base_events.py", line 629, in run_until_complete
self.run_forever()
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\asyncio\base_events.py", line 596, in run_forever
self._run_once()
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\asyncio\base_events.py", line 1890, in _run_once
handle._run()
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self.args)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\uvicorn\server.py", line 76, in serve
config.load()
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\uvicorn\config.py", line 448, in load
self.loaded_app = import_from_string(self.app)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\uvicorn\importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\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 "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "D:\WORK\nonebot\AquaBot.\bot.py", line 27, in
nonebot.load_from_toml("pyproject.toml")
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\nonebot\plugin_init
.py", line 1089, in load_from_toml
return load_all_plugins(set(plugins), set(plugin_dirs))
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\nonebot\plugin_init
.py", line 1031, in load_all_plugins
result = context.run(_load_plugin, manager, plugin_name)

File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\nonebot\plugin_init_.py", line 953, in load_plugin
module = manager.load_plugin(plugin_name)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\nonebot\plugin\manager.py", line 155, in load_plugin
return importlib.import_module(name)
File "D:\SOFTWARE\Anaconda3\envs\nb-cli\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:\SOFTWARE\Anaconda3\envs\nb-cli\lib\site-packages\nonebot\plugin\manager.py", line 267, in exec_module
super().exec_module(module)
File "", line 846, in exec_module
File "", line 930, in get_code
File "", line 386, in cache_from_source
TypeError: expected str, bytes or os.PathLike object, not NoneType`