datalab: empty column fails edge csv import #515

Closed
sheymann opened this Issue Jan 24, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@sheymann
Member

sheymann commented Jan 24, 2012

If a CSV contains an empty column, only a few nodes and edges are imported. It is very easy to create an empty column: just let a semi-column at the end of each line. It generally happens with an Excel export.

Sample:

Source;Target;
a;b;
c;d;
c;d;
c;e;
c;f;
c;g;

Exception raised:
java.lang.NullPointerException
at org.gephi.datalab.impl.AttributeColumnsControllerImpl.importCSVToEdgesTable(AttributeColumnsControllerImpl.java:667)
at org.gephi.datalab.plugin.manipulators.general.ui.ImportCSVUIWizardAction.performAction(ImportCSVUIWizardAction.java:106)
at org.gephi.datalab.plugin.manipulators.general.ImportCSV.execute(ImportCSV.java:61)
[catch] at org.gephi.datalab.api.DataLaboratoryHelper$5.run(DataLaboratoryHelper.java:310)

Currently the user should only uncheck the column before import, but it would be nice to detect such case: if the column doesn't have a name, it is automatically dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment