lum-ai / odinson

Odinson is a powerful and highly optimized open-source framework for rule-based information extraction. Odinson couples a simple, yet powerful pattern language that can operate over multiple representations of text, with a runtime system that operates in near real time.
https://lum.ai/odinson/docs/
Apache License 2.0
65 stars 23 forks source link

Build error occurs when compiling 0.5.0 or 0.6.0 #361

Closed zhyongwei closed 2 years ago

zhyongwei commented 2 years ago

When compiling 0.5.0 and 0.6.0 according to installation doc , we got some error messages:

K:\software\odinson-0.5.0>sbt compile
[info] Loading settings for project odinson-0-5-0-build from plugins.sbt ...
[info] Loading project definition from K:\software\odinson-0.5.0\project
[info] Loading settings for project extra from build.sbt ...
[info] Loading settings for project core from build.sbt ...
[info] Loading settings for project odinson-0-5-0 from build.sbt,version.sbt ...
[error] java.util.NoSuchElementException: None.get
[error]         at scala.None$.get(Option.scala:349)
[error]         at scala.None$.get(Option.scala:347)
[error]         at $e0b2caa19fb2b9768252$.$anonfun$$sbtdef$1(K:\software\odinson-0.5.0\build.sbt:58)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.EvaluateSettings$MixedNode.evaluate0(INode.scala:221)
[error]         at sbt.internal.util.EvaluateSettings$INode.evaluate(INode.scala:164)
[error]         at sbt.internal.util.EvaluateSettings.$anonfun$submitEvaluate$1(INode.scala:87)
[error]         at sbt.internal.util.EvaluateSettings.sbt$internal$util$EvaluateSettings$$run0(INode.scala:98)
[error]         at sbt.internal.util.EvaluateSettings$$anon$3.run(INode.scala:94)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? [error] java.util.NoSuchElementException: None.get
[error] Use 'last' for the full log.

Btw, the version of sbt is 1.3.0.

myedibleenso commented 2 years ago

@zhyongwei , can you please include a gist of your build.sbt?

zhyongwei commented 2 years ago

@myedibleenso Here is the build.sbt file.

Can odinson only be used in docker?

myedibleenso commented 2 years ago

Can odinson only be used in docker?

No, it can be used as a scala library. I'm a little confused by the build.sbt you shared, though. Have you just cloned the repository locally and are trying to run it, or is your goal to create a scala project that has Odinson as a dependency?

If you're trying to write your own scala project that has Odinson as a dependency, you'll want to remove almost that you've included in the build.sbt you've shared (this guide may help you to get started). We can point you to a barebones project template

If you're trying to just run Odinson locally via sbt, you'll want to clone the repository.

The error your seeing relates to [this line] in the build.sbt you shared:

That piece of code assumes you are running the git repo. My guess is you've copied the project, but no longer have the .git directory. Is that the case?

If you want to run the repo as-is, you should clone it locally:

image

https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository

myedibleenso commented 2 years ago

I'm closing this due to inactivity. We can reopen if you would like to discuss further.

kwalcock commented 2 years ago

If one downloads the zip file, which may have been done here given the directory name, the .git files are not included. The git plugin has nothing to work from and will error out. Instead, clone the project with git.