globalbioticinteractions / nomer

maps identifiers and names to other identifiers and names
GNU General Public License v3.0
18 stars 3 forks source link

nomer crashes on [nomer ls wfo] #101

Closed jhpoelen closed 2 years ago

jhpoelen commented 2 years ago

when attempt to list all #96 World of Flora Online name relations using

nomer ls wfo

nomer crashes with the follow exception:

WFO:0000000253  Gymnanthemum baronii    HAS_ACCEPTED_NAME   WFO:0000000253  Gymnanthemum baronii    species     Asterales | Asteraceae | Gymnanthemum | Gymnanthemum baronii    WFO:9000000038 | WFO:7000000146 | WFO:4000016436 | WFO:0000000253   order | family | genus | species    http://www.worldfloraonline.org/taxon/wfo-0000000253    
java.lang.NullPointerException
    at org.eol.globi.service.TaxonUtil.taxonToMap(TaxonUtil.java:197)
    at org.eol.globi.service.TaxonUtil.taxonToMap(TaxonUtil.java:192)
    at org.globalbioticinteractions.nomer.util.AppendingRowHandler.lambda$onRow$1(AppendingRowHandler.java:38)
    at org.eol.globi.service.TermMatcherHierarchical$1.foundTaxonForTerm(TermMatcherHierarchical.java:64)
    at org.globalbioticinteractions.nomer.match.CommonTaxonService.lambda$matchAll$0(CommonTaxonService.java:93)
    at java.util.concurrent.ConcurrentMap.forEach(ConcurrentMap.java:114)
    at org.globalbioticinteractions.nomer.match.CommonTaxonService.matchAll(CommonTaxonService.java:81)
    at org.globalbioticinteractions.nomer.match.CommonTaxonService.match(CommonTaxonService.java:66)
    at org.eol.globi.service.TermMatcherHierarchical.match(TermMatcherHierarchical.java:57)
    at org.globalbioticinteractions.nomer.util.AppendingRowHandler.onRow(AppendingRowHandler.java:35)
    at org.globalbioticinteractions.nomer.cmd.CmdDump.run(CmdDump.java:28)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at org.globalbioticinteractions.nomer.Nomer.run(Nomer.java:57)
    at org.globalbioticinteractions.nomer.Nomer.main(Nomer.java:46)
jhpoelen commented 2 years ago

after implementing an attempted fix, preston ls wfo completed successfully and generated over 1.4M name relations:

$ nomer ls wfo | pv -l  > /dev/null
[main] INFO org.globalbioticinteractions.nomer.match.TermMatcherRegistry - using matcher [wfo]
[main] INFO org.globalbioticinteractions.nomer.match.WorldOfFloraOnlineTaxonService - [WORLD_OF_FLORA_ONLINE] taxonomy already indexed at [/media/jorrit/branta/nomer/world_of_flora_online/world_of_flora_online], no need to import.
1.43M 0:02:17 [10.4k/s] [                                  <=>                 ]
jhpoelen commented 2 years ago

the fix for this issue was included in v0.2.15