You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 20, 2024. It is now read-only.
This is a small step-by-step to reproduce the error:
Have a named pin on any chip above gpiochip0.
Run this code, substitute the GPIO_NAME:
import gpiod
for i in range(1025):
a = gpiod.find_line("GPIO_NAME")
This results in an error about too many open files.
Error:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/python3.10/site-packages/gpiod/__init__.py", line 48, in find_line
File "/usr/lib/python3.10/site-packages/gpiod/libgpiodcxx/__init__.py", line 1285, in __iter__
File "/usr/lib/python3.10/site-packages/gpiod/libgpiod/__init__.py", line 1195, in __iter__
File "/usr/lib/python3.10/site-packages/gpiod/libgpiod/__init__.py", line 118, in gpiod_chip_open
File "/usr/lib/python3.10/site-packages/gpiod/libgpiod/__init__.py", line 89, in _is_gpiochip_cdev
OSError: [Errno 24] Too many open files: '/sys/bus/gpio/devices/gpiochip0/dev'
Potential reason is that find_line doesn't properly close file descriptors when going through the chips. Can not reproduce on gpiochip0 or when trying to find a pin that doesn't exists.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a small step-by-step to reproduce the error:
This results in an error about too many open files.
Error:
Potential reason is that find_line doesn't properly close file descriptors when going through the chips. Can not reproduce on gpiochip0 or when trying to find a pin that doesn't exists.
The text was updated successfully, but these errors were encountered: