【发布时间】: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 行
【问题讨论】:
-
那是因为
bundleFile.loadMleapBundle()返回一个无。请阅读我们的指南如何提问stackoverflow.com/help/mcve
标签: scala serialization mleap