igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] GraphML RuntimeWarning


From: Gianluca Della Vedova
Subject: Re: [igraph] GraphML RuntimeWarning
Date: Tue, 02 Sep 2014 10:23:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
> 

-- 
Gianluca Della Vedova
http://gianluca.dellavedova.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]