ERROR Loop End: Loop Body wired incorrectly (Branches are not permitted to leave loops!).


I am new to KNIME and I can’t find the problem with my feed.
I want to create a loop to combine the data contained in several files from a list of files into a single file.
I have tested several loop functions and the result is negative
Thank you in advance for your help

Hello @SimonDG

The error is being generated because of this branch I’ve enclosed in a red square. You see that it is being calculated outside the main body of the loop, and you are generating a path variable to your Excel Writer, which is totally correct.

You can connect that last String to Path node to the Cross Joiner, since it is a variable, it will be propagated downstream, so the Excel Writer can access it.

I cannot upload an example for you right now, but do let me know if that worked. Otherwise I will do a test and show it to you as soon as I am able.



Another option that should work is put the loop end after the writer node, connect the writer node flow variable output to the loop end flow variable input, then connect the chunk loop start table out directly to the loop end table input.

Thank you for your answer.

It works as follows.



Thank you,

That is perfect


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