Adding python

Hi everyone !

I installed the n8n-hosting starter kit via Docker. I want to use NodeCode when creating a workflow (with Python as the language), but it says it’s not available. I’ve badly tried to add/install Python with n8n on Docker, but I haven’t been successful. Can someone please help me? Thanks.

Hi @rthf,

welcome to the n8n community! I assume that you have setup the latest version of n8n which is currently v2.3.4

Since the release of v2 many setup instructions are outdated due to the fundamental changes of how some things like code execution are implemented. Since v2 it’s mandatory to run an external task runner to support python code execution. This means you need a second docker container.

If you are talking about the starter kit i assume it’s this one: Self-hosted AI Starter Kit | n8n Docs ?
This for example, is not supporting external task runners in the docker compose which is why it does not work. You can use it as base and add the env vars and n8nio/runners image from the external task runner documentation.

2 Likes

Hi @salmansolutions !

Thanks a lot, it works, you are my hero ! Just one thing, it’s not an error, however, the return value must be in JSON, right ?
I’ve got this : “Cannot read properties of null (reading ‘json’)”.

Thank you again.

Great to hear that I was helpful!

Yes, the data sent between the nodes has to be JSON, like described here:

When adding a new Code node, you should see a sample code snippet that returns a single or all items in the desired JSON format.

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