[Networkit] Error report KONECT reader

Christian Staudt christian.staudt at kit.edu
Thu Oct 1 13:08:53 CEST 2015

I got the following error when trying to read this network: http://konect.uni-koblenz.de/networks/flickr-growth

Is the file actually malformed or could the reader be more robust?

In [6]: G = readGraph("out.flickr-growth", Format.KONECT)
RuntimeError                              Traceback (most recent call last)
/amd.home/home/staudt/workspace/NetworKit/networkit/graphio.py in readGraph(path, fileformat, **kwargs)
    126                         try:
--> 127                                 G = reader.read(path)
    128                                 G.setName(os.path.basename(path).split(".")[0]) # set name of graph to name of file

/amd.home/home/staudt/workspace/NetworKit/networkit/_NetworKit.pyx in _NetworKit.GraphReader.read (networkit/_NetworKit.cpp:22807)()
   2162                 with nogil:
-> 2163                         result = move(self._this.read(cpath)) # extra move in order to avoid copying the internal variable that is used by Cython
   2164                 return Graph(0).setThis(result)

RuntimeError: malformed line (expecting 2-4 values, 5 given) 2: 1 2  1 1162422000

During handling of the above exception, another exception occurred:

OSError                                   Traceback (most recent call last)
<ipython-input-6-dce325b192be> in <module>()
----> 1 G = readGraph("out.flickr-growth", Format.KONECT)

/amd.home/home/staudt/workspace/NetworKit/networkit/graphio.py in readGraph(path, fileformat, **kwargs)
    129                                 return G
    130                         except Exception as e:
--> 131                                 raise IOError("{0} is not a valid {1} file: {2}".format(path,fileformat,e))
    132         return None

OSError: out.flickr-growth is not a valid konect file: malformed line (expecting 2-4 values, 5 given) 2: 1 2  1 1162422000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20151001/90ba852a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20151001/90ba852a/attachment.sig>

More information about the NetworKit mailing list