I read too many GML files (several thousand) using igraph with python. At some point in the code run, I received the following runtime error:
RuntimeError: fdopen() failed unexpectedly
I spent a lot of time trying to understand the reasons, but I did not find anything useful.
The main reason here was caused by the code https://github.com/igraph/python-igraph/blob/master/src/filehandle.c#L231
The code I use is below. It breaks through the GML reading line after reading only a few hundred files.
gmls= [] for f in sorted(glob.glob('path_to_gmls'), key=os.path.getsize): g = Graph.Read_GML(f) gmls.append(g)
UPDATE: I tried the same code on Mac and everything works fine. Problems arise in Windows.
UPDATE2: I tested the package using the following code and it works without problems.
import igraph.test igraph.test.run_tests()
source share