Did you also give permissions for the /home/pi directory?
Also do you need to run it exactly with this line?
Also do you need to run it exactly with this line?
python3 test 0You should specify the path:
python3 /home/pi/test.py 0