[Python] using http in dify plugin leads to workflow pausing at plugin node

Discussão em 'Python' iniciado por Stack, Julho 3, 2025.

  1. Stack

    Stack Membro Participativo

    class Kuaidi100QueryTool(Tool): def _invoke(self, tool_parameters: dict[str, Any]) -> Generator[ToolInvokeMessage]: response = requests.post("http://poll.kuaidi100.com/poll/query.do", data={ "com": "yunda", "num": "123456789" }) yield self.create_text_message("test")

    if I remove requests.post,workflow works normally. But if I use http,workflow will reports Failed to transform tool message: PluginlnvokeError: {" args":,"er ror type :ConnectionClosedError","message":"Connection clos ed unexpectedly

    using other ways to start http leads to the same result as above.

    Continue reading...

Compartilhe esta Página