# Loop Body wired incorrectly

**URL:** <https://forum.knime.com/t/loop-body-wired-incorrectly/75527>\
**Category:** KNIME Analytics Platform\
**Created:** [November 22, 2023, 8:00pm UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527 "2023-11-22T20:00:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcrisnidh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mcrisnidh/32/49502_2.png) [@mcrisnidh](https://forum.knime.com/u/mcrisnidh)\
**Post date:** [November 22, 2023, 8:00pm UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527/1 "2023-11-22T20:00:15Z")

</div>

Hello Knimers,

I am trying to list all the files inside multiple paths, for this, I have build a small workflow. My first test was with only one path and worked fine, then I added a loop to make this work with each received path, but I am getting the following error:  
_“Loop Body wired incorrectly (Could not find matching loop start node (missing node annotation)!).”_

![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/6/e6fe0e01929169333d8a03a54e0ef7fddd30373d.png)

As you can see on the image, the first received path it is being read properly (table output shows files), and then it fails, showing the error.

Thank you in advanced for any advise.

---

<div class="post-metadata">

**Author:** ![k10shetty1](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/k/c57346/32.png) [@k10shetty1](https://forum.knime.com/u/k10shetty1)\
**Post date:** [November 30, 2023, 11:14am UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527/2 "2023-11-30T11:14:42Z")

</div>

Hello @mcrisnidh,

Welcome back to the forum!

I tried replicating the issue using a dummy workflow but could not succeed.  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/7/f76b7102070eda01776ade04d4d57d535cd4ff18.png)

To look into the issue you are facing, can you share a workflow with dummy data? This would help us to find exactly what is causing the issue.

Best,  
Keerthan

---

<div class="post-metadata">

**Author:** ![mcrisnidh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mcrisnidh/32/49502_2.png) [@mcrisnidh](https://forum.knime.com/u/mcrisnidh)\
**Post date:** [November 30, 2023, 3:14pm UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527/4 "2023-11-30T15:14:53Z")

</div>

Thank you all for your replies.  
I started playing around with other nodes and was able to get the same results I originally intended.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/b/eba0445cca58eb8379e94d2078731f98ad571e0f.png)

In this case, I am feeding 4 rows of a path in the type of a string, those paths exist and are no longer the path type (as shown in the original post), but what I think did it for me was the Chunk Loop Start instead of the Table Row To Variable Loop Start.

I am not an expert on loops, so my basic knowledge told me try with Table Row To Variable Start and a Loop end, but got the error initially reported.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [November 30, 2023, 4:06pm UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527/5 "2023-11-30T16:06:13Z")

</div>

@mcrisnidh you might want to check the setup of the loop. In the past what sometimes helped was wrapping the thing happening within a loop in a component or meta node.

> [@Knime 4.4 Cant merge variable stacks! (likely a loop problem)](https://forum.knime.com/t/knime-4-4-cant-merge-variable-stacks-likely-a-loop-problem/38773/4):
>
> @joshuash beside what @Thyme is saying these things come to my mind: (especially) with nested loops it can make sense to use Metanodes in order to make sure what part of the loop will do what and how they are wired. You can check „select sope“ by right clicking on the Loop node and see how KNIME would interpret the wiring. it might very well be necessary to check the logic behind the loop and if it would work in every constellation. It might be necessary to provide a dummy table of the same st…

Also:

> [@GROUP LOOP executing only the first loop](https://forum.knime.com/t/group-loop-executing-only-the-first-loop/67915/31):
>
> @pnotova you will have to make sure all the loops are correctly wired. You can select one loop’s current focus with right click. Sometimes it can make sense to put a Cache node in fron of the loop. Also there have been cases where it was best to encapsulate the inner content of a loop in a component in order to make sure what to execute when if you have nested loops. On performance and KNIME in general I can offer this article:

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 28, 2024, 4:06pm UTC](https://forum.knime.com/t/loop-body-wired-incorrectly/75527/6 "2024-02-28T16:06:38Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
