You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue where the Pi (Arm 6 Model A rev2) using Dietpi 8.02 OS which I understand is based on Bullseye Debian.
Switch LED doesn't light up when Pi fully booted, then powers off after about 2 minutes (sudden off no gentle shutdown - so risk of card corruption).
I installed the code and switch as per instructions and it has worked fine previously on raspberry OS lite (headless)
Keen to use DietPi however, and like its functionality.
I used the default pins 7 and 11, and tried again changing to pins 11,15 (editing the script) same result. Also tried changing the power lead and have a good 2A supply which is ample for model A.
Ran the service status diagnostic (with switch attached) :-
● piswitch.service - Starts softshut for Pi Switch
Loaded: loaded (/etc/systemd/system/piswitch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-01-23 09:32:20 GMT; 3min 34s ago
Process: 182 ExecStart=/opt/piswitch/softshut.py (code=exited, status=127)
Main PID: 182 (code=exited, status=127)
CPU: 33ms
Jan 23 09:32:19 RPi1PV systemd[1]: Started Starts softshut for Pi Switch.
Jan 23 09:32:20 RPi1PV softshut.py[182]: /usr/bin/env: ‘python’: No such file or directory
Jan 23 09:32:20 RPi1PV systemd[1]: piswitch.service: Main process exited, code=exited, status=127/n/a
Jan 23 09:32:20 RPi1PV systemd[1]: piswitch.service: Failed with result 'exit-code'.
Then I tested it without the switch and the OS remains stable and on for a long time.
Looking at above - perhaps python hasn't been installed correctly by default in Dietpi? Any ideas? Thanks!
The text was updated successfully, but these errors were encountered:
I have no experience with DietPi, but from your status output it is obvious that the 'python' command is not defined.
In a terminal window (with switch not attached) try to run the command python which will most likely fail.
I guess only python3 is installed. To check this, try to run the command python3 in the terminal window.
If that works change the first line in softshut.py to /usr/bin/env python3.
If that does not work you will have to install python (preferably python3, since python2 is not maintained any more).
Hello!
I have an issue where the Pi (Arm 6 Model A rev2) using Dietpi 8.02 OS which I understand is based on Bullseye Debian.
Switch LED doesn't light up when Pi fully booted, then powers off after about 2 minutes (sudden off no gentle shutdown - so risk of card corruption).
I installed the code and switch as per instructions and it has worked fine previously on raspberry OS lite (headless)
Keen to use DietPi however, and like its functionality.
I used the default pins 7 and 11, and tried again changing to pins 11,15 (editing the script) same result. Also tried changing the power lead and have a good 2A supply which is ample for model A.
Ran the service status diagnostic (with switch attached) :-
● piswitch.service - Starts softshut for Pi Switch
Loaded: loaded (/etc/systemd/system/piswitch.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2022-01-23 09:32:20 GMT; 3min 34s ago
Process: 182 ExecStart=/opt/piswitch/softshut.py (code=exited, status=127)
Main PID: 182 (code=exited, status=127)
CPU: 33ms
Jan 23 09:32:19 RPi1PV systemd[1]: Started Starts softshut for Pi Switch.
Jan 23 09:32:20 RPi1PV softshut.py[182]: /usr/bin/env: ‘python’: No such file or directory
Jan 23 09:32:20 RPi1PV systemd[1]: piswitch.service: Main process exited, code=exited, status=127/n/a
Jan 23 09:32:20 RPi1PV systemd[1]: piswitch.service: Failed with result 'exit-code'.
Then I tested it without the switch and the OS remains stable and on for a long time.
Looking at above - perhaps python hasn't been installed correctly by default in Dietpi? Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: