Skip to content

Gexf export error : com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity) #2998

@totetmatt

Description

@totetmatt

Expected Behavior

Saving my Graph to Gexf

Current Behavior

Breaking with this exception :

[SEVERE] null 
com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)
	at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:531)
	at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:227)
	at javanet.staxutils.helpers.StreamWriterDelegate.writeAttribute(StreamWriterDelegate.java:140)
	at org.gephi.io.exporter.plugin.ExporterGEXF.writeNodes(ExporterGEXF.java:350)
	at org.gephi.io.exporter.plugin.ExporterGEXF.writeGraph(ExporterGEXF.java:244)
	at org.gephi.io.exporter.plugin.ExporterGEXF.execute(ExporterGEXF.java:201)
	at org.gephi.io.exporter.impl.ExportControllerImpl.exportFile(ExportControllerImpl.java:138)
	at org.gephi.desktop.io.export.DesktopExportController$2.run(DesktopExportController.java:112)
	at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.call(LongTaskExecutor.java:336)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Invalid white space character (0x8) in text to output (in xml 1.1, could output as a character entity)
	at com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:56)
	at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:628)
	at com.ctc.wstx.sw.BufferingXmlWriter.writeAttrValue(BufferingXmlWriter.java:1082)
	at com.ctc.wstx.sw.BufferingXmlWriter.writeAttribute(BufferingXmlWriter.java:925)
	at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:528)
	... 12 more

Possible Solution

Issue on handeling string encoding

Steps to Reproduce

  1. Download and unzip csv files

demozoo_bug.zip

  1. Import all csv file, merge as Undirected , Strategy multiedge to First
  2. Try to export as Gexf

Context

Your Environment

Product Version: Gephi 0.10.1 202301172018
Java: 11.0.17; OpenJDK 64-Bit Server VM 11.0.17+8
Runtime: OpenJDK Runtime Environment 11.0.17+8
System: Windows 11 version 10.0 running on amd64; Cp1252; en_FR (gephi)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions