Workflow node err: The connection cannot be established, this usually occurs due to an incorrect host (domain) value

I am having trouble with an execute command node in my workflow. The following code is placed in the execute command “python3 /app/Extract_Text.py {{ $json.path }} /data/shared/TextFolder”.

I am getting the following error: The connection cannot be established, this usually occurs due to an incorrect host (domain) value.

Attached is the workflow:

If i look into it in more detail i can see the n8n node info and any other errors. The results are as follows:

  • From Execute command:
    Command failed: python3 /app/Extract_Text.py {{ $json.path }} /data/shared/TextFolder Traceback (most recent call last): File “/app/Extract_Text.py”, line 3, in import fitz ModuleNotFoundError: No module named ‘fitz’

  • other information: Stack trace

NodeOperationError: The connection cannot be established, this usually occurs due to an incorrect host (domain) value at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/ExecuteCommand/ExecuteCommand.node.js:79:27) at processTicksAndRejections (node:internal/process/task_queues:95:5) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:627:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:878:51 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1211:20

  • n8n version: 1.80.5
  • Database (default: SQLite): Supabase/Postgres SQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows + (WSL)

Which node is it happening at? Did you try checking if the connection is fine and it wasn’t a temporary issue?

this error is occuring at the execution command node. Yeah the connection is fine, i have been trying to tackle the problem for over a day

No reply yet, can someone from the n8n support team please take a look at this?

I faced the same issue, and I tried to use /opt/venv/bin/python3 file.py instead of python3 file.py. It worked for me.