我正在尝试使用noflo-filesystem和noflo-csv运行一些简单的图形,该图形读取 CSV 文件,解析它并将其写入文件。问题是程序等待我不知道如何提供的东西:
图.fbp
Read(filesystem/ReadFile) OUT -> CSV ParseCSV(csv/ConvertCsvToMatrix)
ParseCSV OUT -> IN Write(filesystem/WriteFile)
'dump.csv' -> FILENAME Write(filesystem/WriteFile)
'data.csv' -> In Read
当我跑
.\node_modules\.bin\noflo-nodejs --graph graphs\graph.fbp --batch --register=false --debug
我得到:
DATA -> FILENAME Write() CONN
DATA -> FILENAME Write() DATA
DATA -> FILENAME Write() DISC
DATA -> IN Read() CONN
DATA -> IN Read() DATA
DATA -> IN Read() DISC
DATA -> ENCODING Read() CONN
DATA -> ENCODING Read() DATA
DATA -> ENCODING Read() DISC
Read() OUT -> CSV ParseCSV() CONN
Read() OUT -> CSV ParseCSV() < ..\python_code\web_app\TimeSeries.csv
Read() OUT -> CSV ParseCSV() DATA
Read() OUT -> CSV ParseCSV() > ..\python_code\web_app\TimeSeries.csv
Read() OUT -> CSV ParseCSV() DISC
ParseCSV() OUT -> IN Write() CONN
ParseCSV() OUT -> IN Write() DATA
然后程序挂起。
我试图Write
只用一个字符串来馈送 的 IN 端口:
Read(filesystem/ReadFile) OUT -> CSV ParseCSV(csv/ConvertCsvToMatrix)
'some text' -> IN Write(filesystem/WriteFile)
'dump.csv' -> FILENAME Write(filesystem/WriteFile)
'data.csv' -> In Read
这很好用:
DATA -> IN Write() CONN
DATA -> IN Write() DATA
DATA -> IN Write() DISC
DATA -> FILENAME Write() CONN
DATA -> FILENAME Write() DATA
DATA -> FILENAME Write() DISC
DATA -> IN Read() CONN
DATA -> IN Read() DATA
DATA -> IN Read() DISC
DATA -> ENCODING Read() CONN
DATA -> ENCODING Read() DATA
DATA -> ENCODING Read() DISC
有人会这么好心地建议我如何调试它吗?