Problem with an ImportController

Asked by Artem OBOTUROV

There's also some code based on org.gephi.io.exporter.preview.PDFExporterTest, but it doesn't work:

...
@Before
public void setUp() throws Exception {
  ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
  pc.newProject();
  Workspace workspace = pc.getCurrentWorkspace();
  Container container = Lookup.getDefault().lookup(ContainerFactory.class).newContainer();
  ImportController importController = Lookup.getDefault().lookup(ImportController.class);

  importController.importFile(SOME_FILE);// Fails here

}
...

Because of another NPE:

java.lang.NullPointerException
        at org.gephi.io.importer.plugin.file.ImporterBuilderCSV.isMatchingImporter(ImporterBuilderCSV.java:53)
        at org.gephi.io.importer.impl.ImportControllerImpl.isFileSupported(ImportControllerImpl.java:342)

Any idea or suggestion?

Artem

Question information

Language:
English Edit question
Status:
Answered
For:
Gephi Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mathieu Bastian (mathieu.bastian) said :
#1

The only possible reason I see is that your file doesn't exist or doesn't have an extension

Can you help with this problem?

Provide an answer of your own, or ask Artem OBOTUROV for more information if necessary.

To post a message you must log in.