Strange bug in code node after item lists remove duplicates

Describe the problem/error/question

I have a strange bug after upgrading to n8n 1.16.0. This workflow worked before without problems. I have a code node following an items lists remove duplicates. In the code node I get an error. The error does not depend on my code. If I go to the json output of the items lists remove duplicates and change someything and pin it (e.g. deleting a blank somewhere) the error does not occur anymore.

What is the error message (if any)?

ERROR: Unknown top-level item key: index [item 0]

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.16.0
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Windows 11 Pro

Hi @pghahrem, I am very sorry you are having trouble.

I tried reproducing this on my own n8n instance running 1.16.0 using random data:

The workflow does however complete fine:

Can you share the JSON data you’re sending to your Item Lists node or an example CSV file? You can of course redact anything confidential, it’d just be important to have an example dataset using which the problem can be reproduced.

Hi @MutedJam, please copy my workflow, put the following content into a csv file and use it as input for the node “Read_esterminuebersicht”. Then you should get the error.

Typ;Datum;Startzeit;Endzeit;Name;Angemeldet;Anwesend;Max. Teilnehmer;Trainer;Ort;Status;Sport;Aktivitätsgruppe
Kurs;29.09.2020;18:00;19:15;Ashtanga Yoga Fortgeschr. (Level 3);6;0;10;Nuschin;;buchbar;Yoga;Yoga Grund- und Aufbaukurse

Hi @pghahrem, thanks for sharing these details. I have created the test file, but my workflow would fail before even reaching the Code node. This is because the Item Lists node is looking for a Jahr field which doesn’t exist in the example data:

When removing this field, the workflow finishes as expected for me:

Item Lists:

Code:

Overall result:

So unfortunately I am still unable to reproduce the problem you have reported. Where you perhaps using a different code snippet when encountering this problem?

Hi @MutedJam ,
sorry, please use the below workflow.

Hi @MutedJam , do you have any ideas?

Hi @pghahrem sorry for my late reply. Unfortunately I was not able to reproduce the problem. Using your example dataset I’d get an error different from the one you have reported:

This comes down to your code reading a field Enddatum which is not present in the example dataset. When replacing this reference with Datum the workflow finishes as expected:

Perhaps you can double-check the example you have provided?

Hi @MutedJam : I just found the reason for the error. I was still using an old version of the code node that is apparently not compatible with the items list node und produced the error in the items list node. That occured apparently after the upgrade to the new n8n version.

Thanks for your efforts and your support :blush:

1 Like

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