Unexpected behavior for the "Code" node

Hello everyone! I recently started using n8n and I’m currently testing its API.
I encountered a small issue when using the Code node, where I specify that the language is Python (or pythonNative).
When I register the workflow through the API, the Code node ends up showing two code editors: the default JavaScript editor (but containing Python code) and, below it, the Python editor, which should actually be the only one displayed.
How can I make the node behave correctly so that it only shows the Python editor?
Note: when I do the opposite using “language”: “javaScript”, the node behaves correctly.

Workflow:

Inside code node (get api results):

workflow in typescript:

  • n8n version: 2.10.4
  • Running n8n via DOCKER
  • Operating system: WINDOWS

Hello @ga4Mil

Set the typeVersion property to 2. Version 1 is too old. Or place a new Code node from the nodes panel.

2 Likes

thank you very much!

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