Hello,

I am trying to read a graphml format file in igraph using python shell.
This is the command I run:
g = igraph.read("mumbaiFinal.graphml")

Earlier this seemed to work fine, however now suddenly I am getting
following error:
---------------------------------------------------------------------------
InternalError                             Traceback (most recent call last)
/home/stuti/project/mumbai/<ipython-input-56-119be08d9a80> in <module>()
----> 1 g = igraph.read("mumbaiFinal.graphml")

/usr/local/lib/python2.7/dist-packages/igraph/__init__.pyc in
read(filename, *args, **kwds)
   3986     @param filename: the name of the file to be loaded
   3987     """
-> 3988     return Graph.Read(filename, *args, **kwds)
   3989 load=read
   3990

/usr/local/lib/python2.7/dist-packages/igraph/__init__.pyc in Read(klass,
f, format, *args, **kwds)
   2171             raise IOError("no reader method for file format: %s" %
str(format))
   2172         reader = getattr(klass, reader)
-> 2173         return reader(f, *args, **kwds)
   2174     Load = Read
   2175

InternalError: Error at foreign-graphml.c:1134: xmlParseEntityRef: no name
, Parse error


In the graphml file I have defined the attributes as keys:
<key id="latitude" for="node" attr.name="latitude" attr.type="double"/>
<key id="longitude" for="node" attr.name="longitude" attr.type="double"/>
<key id="label" for="node" attr.name="label" attr.type="string" />
<graph edgedefault="directed">

Could you please help me fix this problem? I am not able to create a graph
itself, and thus not able to proceed further. Any other method/hack to
create graph using graphml file would also do.

Thank you.
-- 
Regards,
Stuti Rastogi
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to