I can execute command but I can't read or write binary files on latest version

In my workflow, I have an execute command node that runs the following Python script:
python3 /files/"new notion habit tracker entry"/get-toggl-tracked-time-yesterday.py

After successfully running this script, the output of the python script gets sent to a file called output.json in the same folder as the script.

I attempt to open the file with “Read Binary File” but get the following error:

ERROR: The file "/files/"new notion habit tracker entry"/output.json" could not be found.

How am I able to run the script, but then not be able to open the output.json file? They’re both just files in the first place? This was working on an older version of n8n but not sure why it isn’t anymore. Maybe I’m doing something wrong

Here is the exact workflow. I haven’t provided the python script however.

I am running with docker and have set up as

docker run --restart=always --name=n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n -v ~/n8n_files:/files -e TZ="Australia/Melbourne" -e N8N_BASIC_AUTH_ACTIVE="true" -e N8N_BASIC_AUTH_USER="myuser" -e N8N_BASIC_AUTH_PASSWORD="mypass" -d n8n-python

I can still read files using n8n, even on the latest version. So I’d suspect this isn’t a general bug.

Can you run ls -lh in your docker container in the directories you are using (/files/ and /files/"new notion habit tracker entry"/), just to double-check the file is where you expect it to be?

Yep it’s still there, here is the output after I run ls -lh:

-rw-r--r-- 1 pi pi 1.2K Jan 31 21:58 get-toggl-tracked-time-yesterday.py
-rw-r--r-- 1 pi pi   28 Feb  1 08:36 output.json

And is your n8n user able to see these files too (for example when running ls inside the Execute Command node)?

Yep it is still there

That seems odd. Are you able to read the output file using the cat command within n8n?

Yep that works too.

try “chmod” 777 the file (just temporarily) and see if it works. I was getting an error and then gave it global rights and it read it.

(I’m new to n8n (THIS SOFTWARE SEEMS AWESOME) and am struggling with getting a variable out of my json payload with read binary file currently but will be able to get it working shortly I’m sure)


What would be the exact command? I tried chmod 777 /files/"new notion habit tracker entry"/output.json but it still could not read binary file. I also tried write binary file and it’s not working. Maybe it’s something to do with my Docker instance?