Hi,
I hope I'm posting in the right place...
I'm totally newbie in python (but not in programming). I've created a test to use quick2wire python api but get an error message. My (reduced) source code is :
!/usr/bin/python3
from time import sleep
from quick2wire.gpio import Pin
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
When I execute it, i get an error message for the last line :
Traceback (most recent call last):
File "./test2.py", line 6, in
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
File "./test2.py", line 6, in
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 88, in init
self.export()
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 110, in export
gpio_admin("export", self.pin_id)
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 47, in gpio_admin
subprocess.check_call(["gpio-admin", subcommand, str(pin)])
File "/usr/lib/python3.1/subprocess.py", line 429, in check_call
retcode = call(_popenargs, *_kwargs)
File "/usr/lib/python3.1/subprocess.py", line 416, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python3.1/subprocess.py", line 646, in init
errread, errwrite)
File "/usr/lib/python3.1/subprocess.py", line 1157, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
I've thus tried a "sudo ./test2.py" but got then a "no module named quick2wire.gpio..." error.
any idea about how to solve it?
Hi,
I hope I'm posting in the right place...
I'm totally newbie in python (but not in programming). I've created a test to use quick2wire python api but get an error message. My (reduced) source code is :
!/usr/bin/python3
from time import sleep
from quick2wire.gpio import Pin
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
When I execute it, i get an error message for the last line :
Traceback (most recent call last):
File "./test2.py", line 6, in
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
File "./test2.py", line 6, in
pins = [Pin(n,Pin.Out) for n in [7, 22, 18, 16, 15, 13, 12, 11]]
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 88, in init
self.export()
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 110, in export
gpio_admin("export", self.pin_id)
File "/home/pi/python_GPIO/quick2wire-quick2wire-python-api-623e5fe/src/quick2wire/gpio.py", line 47, in gpio_admin
subprocess.check_call(["gpio-admin", subcommand, str(pin)])
File "/usr/lib/python3.1/subprocess.py", line 429, in check_call
retcode = call(_popenargs, *_kwargs)
File "/usr/lib/python3.1/subprocess.py", line 416, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python3.1/subprocess.py", line 646, in init
errread, errwrite)
File "/usr/lib/python3.1/subprocess.py", line 1157, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
I've thus tried a "sudo ./test2.py" but got then a "no module named quick2wire.gpio..." error.
any idea about how to solve it?