FileNotFoundError: [Errno 2] No such file or directory: 'sudo': 'sudo'

Can anyone help me with that?
I get this Message when I try to restart or shutdown the System via the GUI-Buttons.

Running Rhasspy via Docker on a Raspberry Pi 3

Dave

Hello daved3luxe and all others,

this is marked as an open issue in github:


possibly this is the cause.

Thanks to synesthesiam, this is a great project!

1 Like

Hello,
I have the same message and no action done for restart or shutdown my system.
Message ā€œFileNotFoundError: [Errno 2] No such file or directory: ā€˜sudoā€™: ā€˜sudoā€™ā€

And I have sudo on my pi.
In https://github.com/rhasspy/rhasspy/issues/169

@synesthesiam said ā€œOK, Iā€™ll hide the button if ā€œsudoā€ isnā€™t available +1ā€ but sudo exist in my pi.
So itā€™s a bug no ?

Thanks

Have noticed that the shutdown button has disappeared on my setup, that would indicate that sudo is not there but it most certainly is there as i can use it in ssh to shutdown, its the only way i have to shut it down at present

Yes I do the same. But when I asked for this evolution it was to have these options in the IHM :wink:
Iā€™m in 2.5.9

@raqpub, @DaveKearley are you running Rhasspy in Docker or via the Debian package? Thereā€™s no sudo in the Docker image, but it should have worked when running natively.

I followed the instructions and its in Docker as i can remember docker commands popping up a few times.

Sudo is on the Pi though as i used it in ssh sessions - can something inside a docker container not see the OS ??

Docker is capsulated, that means rhasspy runs in its own little os inside docker, and has no control over the main os. There is no sudo included in rhasspys docker container os and I donā€™t think you should be able to shut a pi down from inside a docker container anyway, that would defeat the way of separating from the main os.

1 Like

Interesting, thanks.

Does pulling the plug on a Rhasspy Pi run any risk - i know it can cause corruption on something like Home Assistant but thats got logging running on it etc

You always run the risk that things get corrupted because they are not saved properly. Personally I pulled the plug quite often and did not run into any problems, but that is not recommended. I normally ssh in and shut it down, wait for a bit and then pull the plug, that way I avoid corruption. But if I am just on a test installation that I will format again anyway, I sometimes just pull the plug. If you need to restart the pi often, without using ssh then you could connect a button or something to the pi via the pins and run a script on the main os that does a ā€œsudo rebootā€ on button press. The same way you could have a reboot intent and have a script listening on that intent on the main os to reboot the whole pi. Just because it canā€™t be shut down from inside the container does not mean you canā€™t send a restart command from inside to something that can restart on the outside.

Interesting,

could a pi shutdown be initiated from a http node or similar in Node Red ??

That depends. I never did much with node-red and mine runs inside a docker, so I could not do it but if you installed node-red natively on your pi I donā€™t see why not. There has to be some way to run stuff on the local system, maybe take a look at the exec node, that sounds like it could work. Not sure if it can run sudo, but as far as node-red goes, that is the extent of my knowledge.

Ok thanks, i have node red running on another pi, iā€™ll have a look

Hi @synesthesiam
Docker for me.