clulab / eidos

Machine reading system for World Modelers
Apache License 2.0
37 stars 24 forks source link

ExtractFromDirectory app throws errors #206

Closed adarshp closed 6 years ago

adarshp commented 6 years ago

Hi,

I tried extracting events from the MITRE evaluation document corpus with the following invocation:

sbt "runMain org.clulab.wm.eidos.apps.ExtractFromDirectory ~/ml4ai/WorldModelers/MITRE_Evaluation_Documents output_dir"

and things seem to run ok for a while, but then I get this error:

17:29:52.902 [run-main-0] INFO  org.clulab.wm.eidos.EidosSystem$ - domainOntologyPath: /org/clulab/wm/eidos/toy_ontology.yml
[error] (run-main-0) java.lang.NullPointerException
java.lang.NullPointerException
    at org.clulab.wm.eidos.apps.ExtractFromDirectory$.delayedEndpoint$org$clulab$wm$eidos$apps$ExtractFromDirectory$1(ExtractFromDirectory.scala:22)
    at org.clulab.wm.eidos.apps.ExtractFromDirectory$delayedInit$body.apply(ExtractFromDirectory.scala:14)
    at scala.Function0.apply$mcV$sp(Function0.scala:34)
    at scala.Function0.apply$mcV$sp$(Function0.scala:34)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App.$anonfun$main$1$adapted(App.scala:76)
    at scala.App$$Lambda$5/1422905801.apply(Unknown Source)
    at scala.collection.immutable.List.foreach(List.scala:389)
    at scala.App.main(App.scala:76)
    at scala.App.main$(App.scala:74)
    at org.clulab.wm.eidos.apps.ExtractFromDirectory$.main(ExtractFromDirectory.scala:14)
    at org.clulab.wm.eidos.apps.ExtractFromDirectory.main(ExtractFromDirectory.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
[trace] Stack trace suppressed: run last core/compile:runMain for the full output.
java.lang.RuntimeException: Nonzero exit code: 1
    at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last core/compile:runMain for the full output.
[error] (core/compile:runMain) Nonzero exit code: 1
[error] Total time: 3 s, completed Mar 21, 2018 5:29:52 PM
  1. Do I have the right invocation?
  2. Has anybody else run into this issue?
adarshp commented 6 years ago

Nevermind, I got it to work, apparently I needed to have the full path to the input directory in the invocation - the tilde (~) will not work.

kwalcock commented 6 years ago

Does it happen to work without the quotes? The shell might substitute the value in.

adarshp commented 6 years ago

Nope, it does not work without the quotes…

-- Adarsh Pyarelal Postdoctoral Research Associate School of Information & Department of Computer Science University of Arizona Office: Harvill 454 http://adarsh.cc

On Mar 21, 2018, at 5:41 PM, Keith Alcock notifications@github.com wrote:

Does it happen to work without the quotes? The shell might substitute the value in.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/clulab/eidos/issues/206#issuecomment-375141384, or mute the thread https://github.com/notifications/unsubscribe-auth/AAn47Smi9TrJqTDjWUjMInJnCGLSyiwQks5tgvM7gaJpZM4S2RKC.

kwalcock commented 6 years ago

A relative path should work, as in your output_dir. I am submitting a PR which should avoid the NullPointerException in favor of a FileNotFoundException. I'll put your name on it :-)

adarshp commented 6 years ago

Thanks Keith!