CalledProcessError: Command '['gpio-admin', 'export', '24']' returned non-zero exit stautus 4

238 views
Skip to first unread message

Luca c

unread,
May 4, 2015, 4:02:23 AM5/4/15
to quick2wi...@googlegroups.com

Hi all,
I installed quick2wire on raspberry B+ and all seem ok.
I wrote this python script but return an error:

Python 3.2.3 (default, Mar  1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append("/home/pi/quick2wire/quick2wire-python-api/")
>>> import quick2wire.gpio as GPIO
>>> led = GPIO.pi_header_1.pin(18, GPIO.Out)
>>> led.open()
gpio-admin: could not flush data to /sys/class/gpio/export: Device or resource busy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/quick2wire/quick2wire-python-api/quick2wire/gpio.py", line 101, in open
    gpio_admin("export", self.soc_pin_number, self._pull)
  File "/home/pi/quick2wire/quick2wire-python-api/quick2wire/gpio.py", line 16, in gpio_admin
    subprocess.check_call(["gpio-admin", subcommand, str(pin)])
  File "/usr/lib/python3.2/subprocess.py", line 489, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gpio-admin', 'export', '24']' returned non-zero exit status 4
>>>

Sometime the message in the last row is "subprocess.CalledProcessError: Command '['gpio-admin', 'export', '24']' returned non-zero exit status 4"
If Iuse the RPi.GPIO or webiopi the pin works.
Someone can help me?
Thanks
Luca

Andrew Scheller

unread,
May 5, 2015, 7:29:27 AM5/5/15
to quick2wi...@googlegroups.com
See https://github.com/quick2wire/quick2wire-gpio-admin/pull/6 for a fix.

The Quick2Wire code has been abandoned, and isn't being updated by
anybody, so IMHO you're better off sticking with RPi.GPIO (or WebIOPi,
or WiringPi).

Andrew
> --
> You received this message because you are subscribed to the Google Groups
> "Quick2Wire Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to quick2wire-use...@googlegroups.com.
> Visit this group at http://groups.google.com/group/quick2wire-users.
> For more options, visit https://groups.google.com/d/optout.

Luca c

unread,
May 5, 2015, 6:50:12 PM5/5/15
to quick2wi...@googlegroups.com, raspb...@loowis.durge.org
Thanks Andrew, it works! Thanks to DaWoody also!

I also had to change the same strings in the file gpio.py at  line 196 of quick2wire-python-api
Thanks a lot to all

Luca

veerapat boonvanich

unread,
Jun 1, 2015, 3:13:57 PM6/1/15
to quick2wi...@googlegroups.com, raspb...@loowis.durge.org


เมื่อ วันพุธที่ 6 พฤษภาคม ค.ศ. 2015 5 นาฬิกา 50 นาที 12 วินาที UTC+7, Luca c เขียนว่า:


hey! I do that but not work for me, I replace string in gpio.py and gpio-admin.c but error is show agian. please Help 
Reply all
Reply to author
Forward
0 new messages