On 10/11/2020 06:05, Vincent Coen wrote:
> Hello RobH!
>
> Tuesday November 10 2020 17:40, you wrote to All:
>
> > I have a python script to run some leds, and I'm having a problem with
> > it! When I ssh into my pi zero, then sudo python3 python script.py, it
> > doesn't run, no leds are lit.
> > But if I open a terminal in the pi desktop and run the same command
> > line, it works and the leds light up.
>
> > Anyone know why this happens.
>
> Who owns the script.py and where is it ?
>
>
> Remember sudo takes root priv. and the directory so try :
>
> sudo python3 /home/pi/script.py or whater the user name is along with the
> correct python run command is.
>
>
> Vincent
>
I ssh'd into my pi zero, then I created the script with : sudo nano
script.py then copied some other python script into the new script.py.
I then ran sudo python3 script.py from within the directory the said
script is in, which is the Downloads directory.
Nothing happens, no errors, no leds lit.
If I open a terminal window on the pi desktop and run the exact same
sudo python3 script.py, it runs and the leds light up
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|