gephi / gephi

Gephi - The Open Graph Viz Platform
http://gephi.org
GNU General Public License v3.0
5.91k stars 1.57k forks source link

Gexf Encoding on export generates error on import #1514

Open totetmatt opened 8 years ago

totetmatt commented 8 years ago

Opening a .gexf file got error :

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[226,112]
Message: Character reference "&#
    at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:596)
    at org.gephi.io.importer.plugin.file.ImporterGEXF.execute(ImporterGEXF.java:145)
Caused: java.lang.RuntimeException
    at org.gephi.io.importer.plugin.file.ImporterGEXF.execute(ImporterGEXF.java:169)
    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)

For this file Nolife9ans.zip

Graph was originally created via Twitter Stream Import Plugins and exported as Gexf from gephi.

The incriminated line is :

Where � makes import fail. The message is this one ![2016-06-04 10_10_07-gameophage gameophage _ twitter](https://cloud.githubusercontent.com/assets/749891/15798573/bbb14450-2a3c-11e6-8034-1ca60288eca7.png) Which sounds like Gephi encodes the Emoticon as HTML decimal, which generates error at import because &# is a special character in XML.
mbastian commented 2 years ago

Hey, I wasn't able to reproduce this issue. I created a simple GEXF file with <node id="0" label="Gavroche 😆😂"> so it contains an emoticon. The file loaded fine in Gephi. Then I exported it and reimported it. Again, it loads find. Did I miss something? Thx!