浏览代码

Merge branch 'main' into cache-endpoint-and-plugin-install

zxfishhack 6 月之前
父节点
当前提交
7cfc991db3
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      internal/core/plugin_manager/local_runtime/environment_python.go

+ 6 - 2
internal/core/plugin_manager/local_runtime/environment_python.go

@@ -310,10 +310,14 @@ func (p *LocalPluginRuntime) InitPythonEnvironment() error {
 
 	compileWg.Wait()
 	if err := compileCmd.Wait(); err != nil {
-		return fmt.Errorf("failed to pre-compile the plugin: %s", compileErrMsg.String())
+		// skip the error if the plugin is not compiled
+		// ISSUE: for some weird reasons, plugins may reference to a broken sdk but it works well itself
+		// we need to skip it but log the messages
+		// https://github.com/langgenius/dify/issues/16292
+		log.Warn("failed to pre-compile the plugin: %s", compileErrMsg.String())
 	}
 
-	log.Info("pre-loading the plugin %s", p.Config.Identity())
+	log.Info("pre-loaded the plugin %s", p.Config.Identity())
 
 	// import dify_plugin to speedup the first launching
 	// ISSUE: it takes too long to setup all the deps, that's why we choose to preload it