Repository navigation
Description
Summary
Exporting to GEXF produces an empty file, with no error shown, when the node or edge table has a regular attribute column of type TimestampSet (a column other than the timeset property). A spreadsheet edge list with a date column imports with exactly such a column, so the export of that graph is a 0-byte file.
Where
modules/ExportPlugin/src/main/java/org/gephi/io/exporter/plugin/ExporterGEXF.java, writeAttributes(XMLStreamWriter, Column[], String, String):
Column.isDynamic()is true both forTimeMapcolumns (a value per time) and forTimeSetcolumns (a set of times).- The exporter treats every dynamic column as a
TimeMapand callsAttributeUtils.getStaticType(...), which throws for aTimeSettype. execute()catches the exception and logs it, so the export ends quietly with an empty document.
The log has:
SEVERE [org.gephi.io.exporter.plugin.ExporterGEXF]
java.lang.IllegalArgumentException: Unsupported type org.gephi.graph.api.types.TimestampSet
at org.gephi.graph.api.AttributeUtils.getStaticType(AttributeUtils.java:726)
at org.gephi.io.exporter.plugin.ExporterGEXF.writeAttributes(ExporterGEXF.java:325)
#2297 looks like the same confusion in the Appearance module. The spreadsheet exporter handles the same graph (SpreadsheetTest.testNodeTimestampSetOtherColumn).
Steps to reproduce
- Save this as
edges.csv:source,target,date a,b,2025-01-03 a,b,2025-02-10 b,c,2025-03-21 - Import it as an edges table with the default settings. The edge table now has
dateas aTimestampSetcolumn, next to thetimesetproperty. - Export the graph to GEXF.
- The exported file is 0 bytes.
I ran these steps through the import and export controllers on Gephi 0.11.4 rather than through the menus. In a test, GraphGenerator.build(timestampConfiguration).generateTinyGraph().addTimestampSetColumn() followed by ExporterGEXF.execute() writes nothing on current master.
I expect an IntervalSet column to fail the same way, since it takes the same path, but I have not tested it.
Possible fix
Use isDynamicAttribute() where the exporter means a value per time. GEXF has no attribute type for a set of times, so a time-set column could be declared as a string attribute holding its text form (<[3.0, 6.0]>), which is what the spreadsheet exporter writes. The timeset property would be unchanged.
I have this as a small patch with two tests in GEXFTest; the ExportPlugin tests pass with it. I am happy to open a PR if that direction is welcome.
Separately, because execute() swallows the exception, a failed export looks like a successful one. I have left that alone.
Environment
- Gephi 0.11.4, and master (0.11.5-SNAPSHOT) in the ExportPlugin tests
- macOS (Apple Silicon)
This was found and checked together with Claude Code. I ran everything on my own machine and can share the patch and tests.
Activity
feat: say what kind of network the structure suggests; fix the empty …
Fix empty GEXF export when a column is a TimestampSet or IntervalSet (#…
Merge pull request #3403 from MattArtzAnthro/fix-gexf-export-timeset-…