Reputation: 1
I am getting a java.util.NoSuchElementException: None.get on the following code:
// Deserialize a directory bundle
val bundle = (for(bundleFile <- managed(BundleFile(bundle_path))) yield {
bundleFile.loadMleapBundle().get
}).opt.get
The error is on the opt.get line
Upvotes: 0
Views: 183
Reputation: 2744
An example from one of MLeap's tests deserializes a bundle this way:
val bundle = (for(bundle <- managed(BundleFile(new File(lrUri.getPath)))) yield {
bundle.loadMleapBundle().get
}).tried.get
Perhaps you should use tried
instead of opt
.
Upvotes: 0