1

我是 noflo 的新手,并且正在查看示例以进行探索。电子表格示例看起来很有趣,但我无法让它运行。首先,需要一些时间和手动调试来识别丢失的组件,没什么大不了的,我相信将来会改进,现在我得到的错误信息是

return process.component.outPorts[port].attach(socket);
                                          ^
TypeError: undefined is not a function

显然,在此之前 isAddressable() 也是未定义的。检查了这个SO 问题,但我在任何地方都没有任何 noflo 0.4 作为依赖项。花了一些时间调试它,但似乎卡住了,决定发布到 SO。

问题是,运行电子表格示例的正确步骤是什么?

对于复制,这是我所做的:

0) 安装以下组件

noflo-adapters
noflo-core
noflo-couchdb
noflo-filesystem
noflo-groups
noflo-objects
noflo-packets
noflo-strings
noflo-tika
noflo-xml

i) 编辑电子表格/parse.fbp,因为第一个错误是

throw new Error("No outport '" + port + "' defined in process " + proc
          ^
Error: No outport 'error' defined in process Read (Read() ERROR -> IN Display())

显然 couchdb ReadDocument 组件不提供错误输出端口。因此用 ReadFile 替换了 ReadDocument。

18c18
< 'tika-app-0.9.jar' -> TIKA Read(ReadDocument)
---
> 'tika-app-0.9.jar' -> TIKA Read(ReadFile)

ii) 此时,收到以下信息:

if (process.component.outPorts[port].isAddressable()) {
                                       ^
TypeError: undefined is not a function

并通过检查是否在此代码位置定义了 isAddressable 即兴表演:

@@ -259,9 +261,11 @@
     throw new Error("No outport '" + port + "' defined in process " + process.id + " (" + (socket.getId()) + ")");
     return;
   }
-      if (process.component.outPorts[port].isAddressable()) {
+      if (process.component.outPorts[port].isAddressable && process.component.outPorts[port].isAddressable()) {
     return process.component.outPorts[port].attach(socket, index);
   }
   return process.component.outPorts[port].attach(socket);
 };

无论哪种方式都失败了。同样,问题是运行电子表格示例的正确步骤是什么?

提前致谢。

4

0 回答 0