Unable to import graphml file from nodexl

Get help with your data
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
zimcorp
Posts:3
Joined:20 Dec 2016 00:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Unable to import graphml file from nodexl

Post by zimcorp » 20 Dec 2016 00:09

I was following the network analysis guide with NodeXL and Gephi here: http://social-dynamics.org/twitter-network-data/

Was successfully able to capture Twitter data with NodeXL and export the data to a graphml file. However, when I attempted to open the same graphml file with Gephi, I ran into the following error:

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[141081,113]
Message: Character reference "&#
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:596)
at org.gephi.io.importer.plugin.file.ImporterGraphML.readNodeAttValue(ImporterGraphML.java:292)
at org.gephi.io.importer.plugin.file.ImporterGraphML.readNode(ImporterGraphML.java:259)
at org.gephi.io.importer.plugin.file.ImporterGraphML.execute(ImporterGraphML.java:164)
Caused: java.lang.RuntimeException
at org.gephi.io.importer.plugin.file.ImporterGraphML.execute(ImporterGraphML.java:180)
at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:164)
at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:189)
Caused: java.lang.RuntimeException
at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:191)
at org.gephi.desktop.importer.DesktopImportControllerUI$3.run(DesktopImportControllerUI.java:184)
Caused: java.lang.RuntimeException
at org.gephi.desktop.importer.DesktopImportControllerUI$3.run(DesktopImportControllerUI.java:190)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:274)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


I'm running on OSX v 10.11.6, with Java version 8 update 101

Any thoughts as to how I can resolve this issue?

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Unable to import graphml file from nodexl

Post by eduramiba » 20 Dec 2016 09:57

Hi,
You can try to make sure that the file is encoded in UTF-8 and the XML header says so.

zimcorp
Posts:3
Joined:20 Dec 2016 00:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Unable to import graphml file from nodexl

Post by zimcorp » 21 Dec 2016 22:42

Format is already UTF-8.

I updated all of the default gephi plugins, and now I get a nullpointerexception error when attempting to load the file.

Interestingly, if I save the dataset as a csv I'm able to load it properly in geohi, albeit without any edges.

Googling doesn't help me at all. I'm curious because I simply followed the nodexl guide (and all of the nodexl to gephi tutorials are basically the same) to download the twitter dataset and export it as graphml.

zimcorp
Posts:3
Joined:20 Dec 2016 00:02
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Unable to import graphml file from nodexl

Post by zimcorp » 22 Dec 2016 02:01

Update:

Still wasn't able to resolve the "easy" NodeXL import. What I ended up doing was saving the Twitter data downloaded in NodeXL as an excel file. Then I had to manually manipulate the "edges" and "vectors" sheets in the excel file such that there was a new column in the edges sheet that had the Twitter ID (an integer, not the string username) for both the source and target. I then saved each sheet as a separate CSV and imported individually.

There were only 5k or so of each nodes and edges, so it was only mildly time consuming. This would not be preferable for analysing much larger sets (you can get up to 18k tweets when including friends of those whose tweets are caught in the Twitter keyword search).

As I am unfamiliar with Java, my ability to troubleshoot the errors that popped up is limited. Any insights there?

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Unable to import graphml file from nodexl

Post by eduramiba » 22 Dec 2016 11:20

Uhm, there might be a bug in the graphml importer. Can you share your file for reproducing the problem?

You can send it privately to me at the mail address in my github profile https://github.com/eduramiba

elraidor
Posts:11
Joined:26 Jul 2013 18:47
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Unable to import graphml file from nodexl

Post by elraidor » 03 Apr 2017 16:08

Don't know if this helps but...

The NodeXL Twitter import sometimes creates the following string in the data "&#" and Gephi won't import that. In 0.8.2 you used to get an error message indicating the errant string so you could delete it with a text editor, in 0.9 there's no error message, Gephi just sits there and appears to do nothing. Maybe see if there's an odd string like that in the data and remove it?

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable