Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import spreadsheet (csv) The id class does not match with the expected type #1418

Closed
eindzl opened this issue Mar 7, 2016 · 5 comments
Closed

Comments

@eindzl
Copy link

eindzl commented Mar 7, 2016

Hello,
I just moved to gephi 0.9.1 from gephi 0.8.2. I'm trying to add some columns to my nodes data table and I get the following error:

java.lang.IllegalArgumentException: The id class does not match with the expected type (java.lang.Integer)
at org.gephi.graph.impl.NodeImpl.checkIdType(NodeImpl.java:248)
at org.gephi.graph.impl.NodeImpl.(NodeImpl.java:38)
at org.gephi.graph.impl.GraphFactoryImpl.newNode(GraphFactoryImpl.java:99)
at org.gephi.datalab.impl.GraphElementsControllerImpl.buildNode(GraphElementsControllerImpl.java:394)
at org.gephi.datalab.impl.GraphElementsControllerImpl.createNode(GraphElementsControllerImpl.java:91)
at org.gephi.datalab.impl.AttributeColumnsControllerImpl.importCSVToNodesTable(AttributeColumnsControllerImpl.java:677)
[catch] at org.gephi.datalab.plugin.manipulators.general.ui.ImportCSVUIWizardAction.performAction(ImportCSVUIWizardAction.java:112)
at org.gephi.datalab.plugin.manipulators.general.ImportCSV.execute(ImportCSV.java:62)
at org.gephi.datalab.api.DataLaboratoryHelper$5.run(DataLaboratoryHelper.java:325)

I don't understand what's happening. I'm creating the csv file exporting from gephi and then I add new data in Excel.
I have tried with example network Les Miserables and it works fine, so it is probably something in my network, but no clue on what can it be.
Only thing different I've noticed from gephi 0.8.2 is that node's Ids no longer have decimal point, before I had: 0.0, 1.0... now I have: 0, 1...
Any suggestions?
Thank you.

@eindzl
Copy link
Author

eindzl commented Mar 7, 2016

I just realized when importing the Id column is marked as "Interger" in my network while in the example is marked as "string".

@eduramiba eduramiba self-assigned this Apr 12, 2016
@eduramiba
Copy link
Member

Hi,
The id type should be String, what steps do you follow before importing the CSV?

Do you open a gexf file or similar?

@eindzl
Copy link
Author

eindzl commented Apr 12, 2016

Hi,
The file was a .gephi file created in gephi 0.8.2. To import the csv I press the "Import Spreadsheet" button in the "Data Table" tab and follow the steps.

However, I no longer use that file. I created a new one from scratch in gephi 0.9.1 and I don't have any problems now, so I think the problem was somehow related to the fact that the original network was created with the older version.

@eduramiba
Copy link
Member

I see, then it seems that loading an old .gephi project file will cause the id column to be an integer instead of a String.
Thanks for the report!

@eduramiba eduramiba added the High label Jul 18, 2016
@eduramiba eduramiba added this to the 0.9.2 milestone Jul 18, 2016
eduramiba added a commit that referenced this issue Nov 6, 2016
@eduramiba
Copy link
Member

Fixed, will be released with next updates.

eduramiba added a commit that referenced this issue Nov 9, 2016
Based on commit ecbe7bf

#1605 NullPointerException when no attribute is selected in Ranking or Partition
#1469 Impossible to color arcs with a color gradient with 0.9.1
#1477 Import wizard 0.9.1 now showing any options
#1487 Fix - add try/finally logic to wrap graph reentrant locks for layouts
#1536 Add Edge dialog only remembers source index
#1418 Import spreadsheet (csv) The id class does not match with the expected type
#1387 Exception on ranking with column with null values
#1612 Ranking min/max for uncommon types - UnsupportedOperationException: 'commlist' is not a sortable column (int[])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants