JuliaGraphs / GraphIO.jl

Graph IO functionality for various formats.
Other
61 stars 27 forks source link

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

Open Shushman opened 3 years ago

Shushman commented 3 years ago

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

joaopedromattos commented 2 years ago

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!