Run failed: iteration has no nested nodes #5452

Closed
opened 2026-02-21 18:11:02 -05:00 by yindo · 3 comments
Owner

Originally created by @JiangYain on GitHub (Sep 8, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I've got three different cases after a conditional statement. Case1 iterates A. Case2 iterates B. Iterations of Case1 and 2 are both working correctly. Case3: Run iteration A and then iteration B. Run failed: iteration has no nested nodes

✔️ Expected Behavior

Normal operation of subsequent iteration nodes

Actual Behavior

Run failed: iteration has no nested nodes

Originally created by @JiangYain on GitHub (Sep 8, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I've got three different cases after a conditional statement. Case1 iterates A. Case2 iterates B. Iterations of Case1 and 2 are both working correctly. Case3: Run iteration A and then iteration B. Run failed: iteration has no nested nodes ### ✔️ Expected Behavior Normal operation of subsequent iteration nodes ### ❌ Actual Behavior Run failed: iteration has no nested nodes
yindo added the 🐞 bug label 2026-02-21 18:11:02 -05:00
yindo closed this issue 2026-02-21 18:11:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 8, 2024):

The error "iteration has no nested nodes" in Case3 occurs because the Iteration node requires nested nodes to execute multiple steps on list objects. Ensure that nested nodes are properly configured within the Iteration node. Here is a detailed example of how to set up an Iteration node with nested nodes:

  1. Start Node: Enter the story title and outline.
  2. Generate Subtitles and Outlines Node: Use this node to generate the complete content from the user input.
  3. Extract Subtitles and Outlines Node: Convert the complete content into an array format.
  4. Iteration Node: Use this node to wrap an LLM Node and generate content for each chapter through multiple iterations.
  5. Direct Answer Node: Add this node inside the iteration node to achieve streaming output after each iteration.

Ensure that the nested nodes are correctly defined and configured within the Iteration node to avoid this error [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 8, 2024): <!-- Answer --> The error "iteration has no nested nodes" in Case3 occurs because the Iteration node requires nested nodes to execute multiple steps on list objects. Ensure that nested nodes are properly configured within the Iteration node. Here is a detailed example of how to set up an Iteration node with nested nodes: 1. **Start Node**: Enter the story title and outline. 2. **Generate Subtitles and Outlines Node**: Use this node to generate the complete content from the user input. 3. **Extract Subtitles and Outlines Node**: Convert the complete content into an array format. 4. **Iteration Node**: Use this node to wrap an **LLM Node** and generate content for each chapter through multiple iterations. 5. **Direct Answer Node**: Add this node inside the iteration node to achieve streaming output after each iteration. Ensure that the nested nodes are correctly defined and configured within the Iteration node to avoid this error <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/README.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/iteration.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@JiangYain commented on GitHub (Sep 8, 2024):

I'm pretty sure the iteration nodes for case3 are exactly the same as in cases 1 and 2, except that iterations A and B are arranged in sequence along the path for case3.

Case3 中出现“迭代没有嵌套节点”的错误是因为迭代节点需要嵌套节点才能对列表对象执行多个步骤。请确保迭代节点中嵌套节点的配置正确。以下是设置带有嵌套节点的迭代节点的详细示例:

  1. 起始节点:输入故事标题和概要。
  2. 生成字幕和大纲节点:使用此节点从用户输入生成完整的内容。
  3. 提取字幕和轮廓节点:将完整内容转换为数组格式。
  4. 迭代节点:使用此节点包装LLM节点并通过多次迭代为每个章节生成内容。
  5. 直接答案节点:在迭代节点里面添加此节点,实现每次迭代后的流式输出。

确保在迭代节点内正确定义和配置嵌套节点,以避免此错误[1] [2]

要继续与Dosu交谈,请提及@dosu。

@JiangYain commented on GitHub (Sep 8, 2024): I'm pretty sure the iteration nodes for case3 are exactly the same as in cases 1 and 2, except that iterations A and B are arranged in sequence along the path for case3. > Case3 中出现“迭代没有嵌套节点”的错误是因为迭代节点需要嵌套节点才能对列表对象执行多个步骤。请确保迭代节点中嵌套节点的配置正确。以下是设置带有嵌套节点的迭代节点的详细示例: > > 1. **起始节点**:输入故事标题和概要。 > 2. **生成字幕和大纲节点**:使用此节点从用户输入生成完整的内容。 > 3. **提取字幕和轮廓节点**:将完整内容转换为数组格式。 > 4. **迭代节点**:使用此节点包装**LLM节点**并通过多次迭代为每个章节生成内容。 > 5. **直接答案节点**:在迭代节点里面添加此节点,实现每次迭代后的流式输出。 > > 确保在迭代节点内正确定义和配置嵌套节点,以避免此错误[[1] ](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/README.md)[[2]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/iteration.md)。 > > _要继续与[Dosu](https://dosu.dev)交谈,请提及@dosu。_
Author
Owner

@JiangYain commented on GitHub (Sep 10, 2024):

问题解决,可以尝试避免复制粘贴迭代。前端和容器均没有logs报错。

@JiangYain commented on GitHub (Sep 10, 2024): 问题解决,可以尝试避免复制粘贴迭代。前端和容器均没有logs报错。
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5452