Error: ENOENT: no such file or directory on balena push.

When doing a balena push with the latest CLI I get the following error message. I have tried adding .venv (which is a Python virtual environment) to the .dockerignore file, but still the same thing. When deleting the .venv folder, everything goes through ok. It seems that the file it is referring to is a shortcut, and for that reason I guess can’t follow it.

I have been able to get this working by removing the .venv folder, but wanted to report it here to see if there may be some more viable fix.

% balena push balena.local --nocache --debug
[debug] new argv=[/usr/local/lib/balena-cli/bin/node,/usr/local/lib/balena-cli/bin/run,push,balena.local,--nocache] length=5
[Debug]   Using build source directory: . 
[Debug]   Pushing to local device: balena.local
[Debug]   Checking we can access device
[Debug]   Sending request to
[Debug]   Checking device supervisor version: 12.3.5
[Info]    Starting build on device
[Debug]   Loading project...
[Debug]   Resolving project...
[Debug]   docker-compose.yml file found at "."
[Debug]   Creating project...
[Debug]   Tarring all non-ignored files...
No such file or directory: /app/.venv/bin/python

Error: ENOENT: no such file or directory, stat '/app/.venv/bin/python'

For further help or support, visit:

May have been as silly as I wasn’t adding the / on the end of my .dockerignore file:

Not: .venv

But: .venv/