I can confirm that I have the same warning, but using the C interface. It seems that it is not a problem, as the file is read correctly.
Best, On 01/09/2014 22:09, Bradford Boyle wrote: > When I try to read GraphML files written with python-igraph, I get the > following `RuntimeWarning`: > > RuntimeWarning: Could not add vertex ids, there is already an 'id' > vertex attribute at foreign-graphml.c:416 > > For example, consider the following simple [GraphML file][1]: > > <?xml version="1.0" encoding="UTF-8"?> > <graphml xmlns="http://graphml.graphdrawing.org/xmlns" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns > http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"> > <graph id="G" edgedefault="undirected"> > <node id="n0"/> > <node id="n1"/> > <edge id="e1" source="n0" target="n1"/> > </graph> > </graphml> > > and a simple python script: > > import igraph > > G1 = igraph.Graph.Read_GraphML('wiki.graphml') > G1.write_graphml('wiki-ig.graphml') > G2 = igraph.Graph.Read_GraphML('wiki-ig.graphml') > > which loads the original GraphML files, saves it to a new GraphML file, and > then tries to read back the just written file. Note the `RuntimeWarning` is > only generated on the second `Read_GraphML()`. Am I using `write_graphml()` > and/or `Read_GraphML()` incorrectly? > > For reference, I am running Ubuntu 14.04 with python-igraph 0.7 from PyPI. > > Thanks, > > Bradford > > > [1]: http://en.wikipedia.org/wiki/GraphML#Introduction_to_GraphML > > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > -- Gianluca Della Vedova http://gianluca.dellavedova.org _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
