Permission Error 13 in python for gpio

Started by Nitish, August 21, 2021, 07:24:54 AM

Previous topic - Next topic


using pyA64 library for development but getting permission error on gpio.init() function.
don't understand how to solve this.
BTW i'm new to linux development.
please help!
thanks in advance.


Technical support and documentation manager at Olimex


I've already read it and it works with sysfs but when i write a python code with pyA64 library it gives permission error.
followed all directions to install python too but didn work for me.
error persist.


Did you export the GPIO you are testing with? Did you try with other GPIOs?
Technical support and documentation manager at Olimex


from pyA64.gpio import gpio
from pyA64.gpio import port
from pyA64.gpio import connector

#pin = port.PE15

pin = (5-1)*32+15


gpio.setcfg(pin, gpio.OUTPUT)
gpio.output(pin, 1)

this is the code.
gpio143 already exported and its shows in list.

ERROR : gpio.init()
        PermissionError: [Error 13] Permission denied

Even other pins I've tried but same error occurs.

Do i need to do anything else for this error?


If that's Linux error 13 it's a lack of permission.



Thanks Guys for Help.
Finally, its working.
I changed permission of every file of pyA64 and it worked.
But there's one issue with it is, pin PB0 to PB4 isnt working with it.
Is there any solution to this?


The problem is in the pyA64 project. It is outdated, it was made for Armbian and probably is not updated for Olimage images.

Check this old thread for the same issue:
Technical support and documentation manager at Olimex