Black Lives Matter. Please consider donating to Black Girls Code today.

Igraph with Plotly

Greetings all,

I’m trying to build a network graph using igraph and Plotly, following this example:

Unfortunately, as soon as I try to read a GML file (G = ig.Graph.Read_GML('mytestdata.gml')), I get a segmentation fault (i.e. python crashes).

Now, I realise this is an igraph issue, not a Plotly issue, and I have filed a bug report with igraph, but… I was just wondering whether anyone else had had a similar experience, and, if so, whether there are any workarounds I could try?

Thanks in advance!

@isokrates I’m the author of the plotly plot of this network. I’ve just rerun the corresponding notebook:, and it works fine. Here is the gml file I read:

Perhaps you ran the code posted at Plotly, where the file has an inappropriate extension, netscience.gml.txt.

1 Like

Thanks very much for getting back to me! I was trying with a GML file I exported from Gephi. I just tried with your data, though, and it works fine, so I guess it must be my data. Can node IDs be strings, or do they have to be integers?