【发布时间】:2023-03-07 11:07:02
【问题描述】:
我希望有人可以帮助我并告诉我我做错了什么。提前致谢。
我正在 Gate 的 groovy 控制台上执行此脚本
new File("../outfile.csv").withWriterAppend{ out ->doc.getAnnotations().each {anno ->
if( anno.getFeatures() )
anno.getFeatures().each{ fName, fValue ->
out.writeLine(/"${doc.getName()}","${anno.getType()}","${doc.stringFor(anno)}",${anno.start()},${anno.end()},"${fName}","${fValue}"/)
}
else
out.writeLine(/"${doc.getName()}","${anno.getType()}","${doc.stringFor(anno)}",${anno.start()},${anno.end()},,/)
}}
但我有这个例外
groovy.lang.MissingPropertyException:没有这样的属性:类文档:ConsoleScript0
at ConsoleScript0$_run_closure1.doCall(ConsoleScript0:2)
at ConsoleScript0.run(ConsoleScript0:1)
at gate.groovy.GroovySupport$1$1$1.run(GroovySupport.java:134)
【问题讨论】: