V2 Python Code Node missing builtin variables

Describe the problem/error/question

The new Native Python runtime for the Code Node seems to be missing a lot of the builtin variables the old Python Code Node had. See for example: n8n metadata | n8n Docs . I can’t even refer to a node more than 1 node back anymore it seems. Is this intentional? Or should we not use Python Code Node at all any more?

What is the error message (if any)?

name '_xxx' is not defined

Please share your workflow

Share the output returned by the last node

name ‘_xxx’ is not defined

Information on your n8n setup

  • n8n version: 2.1.4
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Task runners enabled
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: irrelevant
1 Like

Hi @TomNes94, welcome!

This is exactly what the default note is referring to when switching to Python option:

So yes, this functionality is simply not supported within Python Code option..