Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError #14

Open
mthd98 opened this issue Aug 27, 2018 · 6 comments · May be fixed by #26
Open

PermissionError #14

mthd98 opened this issue Aug 27, 2018 · 6 comments · May be fixed by #26

Comments

@mthd98
Copy link

mthd98 commented Aug 27, 2018

hi vitiyal
i have problem can you help me to fix it
iam using nvidia jetson tx2 and i'm new user for Ubuntu

PermissionError(388, 'Permission denied')

/home/nvidia/.local/lib/python3.5/site-packages/gpio.py(75)wrapped()
-> with open(pjoin(gpio_root, 'export'), 'w') as f:

how i can fix it

@vitiral
Copy link
Owner

vitiral commented Aug 27, 2018 via email

@jreindel
Copy link

Running python in sudo should fix this.
Also make sure you aren't using using any commands, like gpio.output(), before doing gpio.setup. This will also return a permission error.
I recently wrote a little tutorial for this library running on Jetson TX2 over on the nvidia devtalk site: https://devtalk.nvidia.com/default/topic/1030443/using-gpio-on-nvidia-jetson-tx2/?offset=4#5330619

@rhjdvsgsgks
Copy link

hi everyone

FMODE = 'w+' # w+ overwrites and truncates existing files

i found that when fmode is w+ will throw a error even run with sudo

PermissionError: [Errno 13] Permission denied: '/sys/class/gpio/export'

but change it to w can resolve this problem

@Gadgetoid
Copy link
Collaborator

Curious. I wonder if this is true in all cases, or if we should add a way to customise FMODE.

@aSmig aSmig linked a pull request Sep 13, 2022 that will close this issue
@VyCOSystems
Copy link

hi everyone

FMODE = 'w+' # w+ overwrites and truncates existing files

i found that when fmode is w+ will throw a error even run with sudo

PermissionError: [Errno 13] Permission denied: '/sys/class/gpio/export'

but change it to w can resolve this problem

same for me, running version 1.0.0.
Maybe add a way for controlling F mode per pin?

some of them only need to be output only.

thanks

@vitiral
Copy link
Owner

vitiral commented Feb 15, 2023

sounds like a reasonable feature/setting to add when creating pins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants