[Networkit] Error on writing

Christian Staudt christian.staudt at kit.edu
Mon Jul 6 15:07:45 CEST 2015

Hi NetworKit developers,
now I have a support question too: I want to write a weighted graph to an edge list of the format
	u	v 	w
where u and v are the end nodes and w is an edge weight. If I try to do that graphio.EdgeListWriter throws an error with empty text:

In [2]: G = readGraph("/Users/cls/Downloads/opsahl-usairport/out.opsahl-usairport", Format.KONECT)

In [3]: U = G.toUndirected()

In [4]: writeGraph(U, "airtraffic.graph", Format.EdgeListTabZero)
RuntimeError                              Traceback (most recent call last)
<ipython-input-4-3f775e968492> in <module>()
----> 1 writeGraph(U, "/Users/cls/workspace/AlgoIProgrammieraufgabe/data/airtraffic.graph", Format.EdgeListTabZero)

/Users/cls/workspace/NetworKit/networkit/graphio.py in writeGraph(G, path, fileformat, **kwargs)
    209 	"""
    210         writer = getWriter(fileformat, **kwargs)
--> 211         writer.write(G, path)
    212         logging.info("wrote graph {0} to file {1}".format(G, path))

_NetworKit.pyx in _NetworKit.EdgeListWriter.write (networkit/_NetworKit.cpp:21233)()


I’ve also modified the writer so that it writes the desired format, but I keep getting the error.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150706/e736877a/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/20150706/e736877a/attachment.sig>

More information about the NetworKit mailing list