From 0eadf5f4e989ef0206c0fc43c9a97eb5d97aa783 Mon Sep 17 00:00:00 2001 From: yanyongyu Date: Fri, 2 Apr 2021 00:05:27 +0800 Subject: [PATCH] :bug: fix load error --- nonebot/plugin/manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nonebot/plugin/manager.py b/nonebot/plugin/manager.py index fdbfe43b..c83a019a 100644 --- a/nonebot/plugin/manager.py +++ b/nonebot/plugin/manager.py @@ -179,7 +179,8 @@ class PluginFinder(MetaPathFinder): newname = manager._rewrite_module_name(fullname) if newname: spec = PathFinder.find_spec( - newname, [*manager.search_path, *(path or [])], target) + newname, [*manager.search_path, *(path or sys.path)], + target) if spec: spec.loader = PluginLoader(manager, newname, spec.origin)