Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"Long cannot be cast to a String" when either exporting a graph or saving a gephi file #679
(As advised from this forum post -> https://forum.gephi.org/viewtopic.php?f=29&t=2233)
"A way to reproduce the bug, or a description of what you was doing. "
"The configuration of your machine: Windows/Mac/Linux and system version; type of graphic card: Nvidia/ATI/integrated-to-motherboard. "
"The Java stack trace if exists."
"The log file."
I'm having a similar problem, but using the Scripting Console.
Trying to execute the following lines:
>>> n1 = g.addNode() >>> n2 = g.addNode() >>> e = g.addEdge(n1,n2) >>> print e e1 >>> e.id = 0 >>> print e Traceback (most recent call last): File "<input>", line 1, in <module> ClassCastException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String >>> e.id = '0' >>> print e e0 >>>
I get the same exception when saving it in .gephi format or gexf format, but not when saving as a csv file.
This seems to be a similar issue as the one described by John, if not exactly the same, so I am adding it to the discussion.
This issue happens because it is possible to set the node id through the method setValue(String column, Object value) from the AttributeRow class. Any plugin that use this method to set the node id are vulnerable to this bug.
I see three different solutions for it: