Importing Gexf file on Osx Mavericks - Parse Error

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
MT_OMH
Posts:4
Joined:04 Aug 2014 14:28
[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
Importing Gexf file on Osx Mavericks - Parse Error

Post by MT_OMH » 04 Aug 2014 15:07

I get this error when I'm trying to open a gexf file.

"java.lang.RuntimeException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[17,58]
Message: XML document structures must start and end within the same entity."

Anyone with a solution?

Thanks in advance

hbruch
Posts:11
Joined:27 Jul 2014 16:57
Location:Germany, Stuttgart
[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: Importing Gexf file on Osx Mavericks - Parse Error

Post by hbruch » 04 Aug 2014 21:12

Hi,

sounds as the structure of the GEXF file is corrupted. Did you check if at row 17, col 58 there is a problem, as the error message suggests?
You could try a xml validation utility, e.g. validator.w3.org, to track down any poblems.
Otherwise I'd suggest you post a minimized example file that still has this problem.

Best regards,
Holger

MT_OMH
Posts:4
Joined:04 Aug 2014 14:28
[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: Importing Gexf file on Osx Mavericks - Parse Error

Post by MT_OMH » 20 Aug 2014 19:33

You are right! The file is corrupt, but the problem is that Gephi created the file. He just stops writing at row 17. The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2" xmlns:viz="http://www.gexf.net/1.2draft/viz" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd">
<meta lastmodifieddate="2014-08-04">
<creator>Gephi 0.8.1</creator>
<description></description>
</meta>
<graph defaultedgetype="directed" timeformat="double" mode="dynamic">
<attributes class="node" mode="static">
<attribute id="hits" title="hits" type="integer"></attribute>
<attribute id="content-type" title="content-type" type="string"></attribute>
<attribute id="domain" title="domain" type="string"></attribute>
<attribute id="type" title="type" type="string"></attribute>
<attribute id="bytes" title="bytes" type="integer"></attribute>
<attribute id="status code" title="status code" type="integer"></attribute>
</attributes>
<attributes class="node" mode="dynamic">
<attribute id="time_interval" title="time_interval"
I have used the plugin HTTP graph to create a graph and exported it via Gephi to a .gexf file. After importing, it gives the "Java-error" described on 04 august 2014.

Best regards

hbruch
Posts:11
Joined:27 Jul 2014 16:57
Location:Germany, Stuttgart
[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: Importing Gexf file on Osx Mavericks - Parse Error

Post by hbruch » 21 Aug 2014 08:30

Hi,

thanks for checking this. I was able to reproduce the file corruption. When I export the graph generated by the HTTP Graph plugin, a popup dialog indicates a NullPointerException:
java.lang.RuntimeException: java.lang.NullPointerException
at org.gephi.desktop.io.export.DesktopExportController$2.run(DesktopExportController.java:107)
at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:251)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NullPointerException
at org.gephi.io.exporter.plugin.ExporterGEXF.writeAttributes(ExporterGEXF.java:338)
at org.gephi.io.exporter.plugin.ExporterGEXF.writeAttributes(ExporterGEXF.java:310)
...
Seems as the ExporterGEXF does not yet support the export of columns of type time_interval.

Workaround: in the DataLaboratory, delete the column time_interval before exporting the graph to gexf.

Best regards,
Holger

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