ApacheZeppelin-笔记作用域输入表单错误
创始人
2024-09-06 18:01:05
0

在写 Apache Zeppelin 的笔记时,如果您的检查指针(inspection pointer)定位在某个表单(input form)上并且您尝试更改笔记段落的作用域,您可能会遇到类似以下错误的问题:

"Cannot read property 'name' of undefined TypeError: Cannot read property 'name' of undefined"

这是因为您的术语解释(glossary)或值设置(variable setting)中存在一些错误。以下代码示例演示了如何解决此问题:

%spark

// set up the variables that will be used in the input form val name = "John Doe" val age = 35

// create the form print("## Input\n\n") print("- Name: ") z.input("name", name) print("- Age: ") z.input("age", age)

// return the values entered in the input form z.get("name") z.get("age")

// end the input form print("\n\n## Output\n\n") print("- Name: " + z.get("name") + "\n") print("- Age: " + z.get("age") + "\n")

请注意,如果您在输入表单中为某个变量设置了一个空值,或者如果您在笔记段落之间使用了不同的变量名称,以下错误的代码将会产生。这对于检查解释器指针的位置并通过调用“zeppelinContext.get()”来获取值的用户来说是一个常见的问题:

"java.lang.NullPointerException at org.apache.zeppelin.interpreter.LazyOpenInterpreter.getValueFromDisplay(LazyOpenInterpreter.java:259) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:882) at org.apache.zeppelin.scheduler.Job.run(Job.java:188) at org.apache.zeppelin.scheduler.FIFOScheduler$

相关内容

热门资讯

记者揭秘!智星菠萝辅助(透视辅... 记者揭秘!智星菠萝辅助(透视辅助)拱趴大菠萝辅助神器,扑克教程(有挂细节);模式供您选择,了解更新找...
一分钟揭秘!约局吧能能开挂(透... 一分钟揭秘!约局吧能能开挂(透视辅助)hhpoker辅助靠谱,2024新版教程(有挂教学);约局吧能...
透视辅助!wepoker模拟器... 透视辅助!wepoker模拟器哪个好用(脚本)hhpoker辅助挂是真的,科技教程(有挂技巧);囊括...
透视代打!hhpkoer辅助器... 透视代打!hhpkoer辅助器视频(辅助挂)pokemmo脚本辅助,2024新版教程(有挂教程);风...
透视了解!约局吧德州真的有透视... 透视了解!约局吧德州真的有透视挂(透视脚本)德州局HHpoker透视脚本,必胜教程(有挂分析);亲,...
六分钟了解!wepoker挂底... 六分钟了解!wepoker挂底牌(透视)德普之星开辅助,详细教程(有挂解密);德普之星开辅助是一种具...
9分钟了解!wpk私人辅助(透... 9分钟了解!wpk私人辅助(透视)hhpoker德州透视,插件教程(有挂教学);风靡全球的特色经典游...
推荐一款!wepoker究竟有... 推荐一款!wepoker究竟有透视(脚本)哈糖大菠萝开挂,介绍教程(有挂技术);囊括全国各种wepo...
每日必备!wepoker有人用... 每日必备!wepoker有人用过(脚本)wpk有那种辅助,线上教程(有挂规律);wepoker有人用...
玩家必备教程!wejoker私... 玩家必备教程!wejoker私人辅助软件(脚本)哈糖大菠萝可以开挂,可靠技巧(有挂神器)申哈糖大菠萝...