GraphIO.jl icon indicating copy to clipboard operation
GraphIO.jl copied to clipboard

Not obvious that gname arg should be "digraph" rather than "graph" when loading directed graph

Open Shushman opened this issue 3 years ago • 1 comments

I was trying to read in the manhatten.graphml file here with loadgraph(...) with the second gname argument hidden and got the Graph graph not found error. But the GraphML file in question has only one graph. Looking at this line (https://github.com/JuliaGraphs/GraphIO.jl/blob/master/src/GraphML/GraphML.jl#L57) it appears that if the graph is directed, then we need to give "digraph" as the second argument to loadgraph

Shushman avatar Nov 17 '20 02:11 Shushman

I had the same issue with GML format... I will go a little further and say that it is not obvious to know what the gname parameter does at all.

Anyway, thanks for the issue, it saved my day!

joaopedromattos avatar Nov 24 '21 12:11 joaopedromattos