【问题标题】:Unable to deserialize mleap bundle无法反序列化 mleap 包
【发布时间】:2019-01-31 16:10:27
【问题描述】:

我在以下代码中得到 java.util.NoSuchElementException: None.get:

// Deserialize a directory bundle
val bundle = (for(bundleFile <- managed(BundleFile(bundle_path))) yield {
    bundleFile.loadMleapBundle().get
}).opt.get

错误出现在 opt.get 行

【问题讨论】:

标签: scala serialization mleap


【解决方案1】:

example from one of MLeap's tests 以这种方式反序列化包:

val bundle = (for(bundle <- managed(BundleFile(new File(lrUri.getPath)))) yield {
      bundle.loadMleapBundle().get
    }).tried.get

也许您应该使用tried 而不是opt

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-23
    • 2018-03-06
    • 1970-01-01
    • 2016-12-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多