shalom
Posts: 2
Joined: Thu May 14, 2015 5:15 am

Run Time Error

Thu May 14, 2015 7:04 am

#!usr/bin/python 3
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(22,GPIO.OUT)

print ("LIGHT ON")

GPIO.system(22,HIGH)
time.sleep(4)

GPIO.cleanup()


Quetion : RUNTIME ERROR: NO ACCESS/ path root?

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Run Time Error

Thu May 14, 2015 7:15 am

Did you try running it as root?

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Run Time Error

Thu May 14, 2015 7:26 am

What ame said.

Also, there shouldn't be a space between "python" and "3" and there should be a "/" (slash) before "usr"
shalom wrote:#!usr/bin/python 3
It should be

Code: Select all

#!/usr/bin/python3

ghp
Posts: 1517
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Run Time Error

Thu May 14, 2015 7:32 am

... and "GPIO.system" should most possibly be a "GPIO.output"
... and the HIGH should go to GPIO.HIGH

good luck !

Return to “Python”