Wappler Version : 3.0.1
Operating System : Win10 latest
The Import CSV File server connect action is causing the following error in Nodejs in the console:
{status: "500", message: "csv.split is not a function",…}
message: "csv.split is not a function"
stack: "TypeError: csv.split is not a function↵ at parseCSV (/opt/node_app/lib/modules/import.js:14:20)↵ at App.csv (/opt/node_app/lib/modules/import.js:45:16)↵ at async App._exec (/opt/node_app/lib/core/app.js:224:30)↵ at async App._exec (/opt/node_app/lib/core/app.js:206:17)↵ at async App.exec (/opt/node_app/lib/core/app.js:177:9)↵ at async App.define (/opt/node_app/lib/core/app.js:160:9)"
status: "500"
I am quite sure I excluded all other possible causes of this error and even using a static .csv file (which imports flawlessly in PHP) or .c file causes this error if it’s the only action in my server connect script. So, I suppose it’s a bug, only in nodejs, in php it still works fine.
The import needs a big update, the current version is very simple and doesn’t work on all csv files. It requires a proper parser instead of the split method used currently. I don’t think my solution fixes the extra empty line, since the fix is almost the same as you had.
Actually your solution still throws the error: parseCSV: error parsing csv.
So I quoted that part out to make it “work” for now.
Can you give any due date to be expected for the big update of the import module?
I depend a lot on reliable import modules (csv and xml) for my projects.
Thanks for you reply in advance.
Could you send me one of your csv files in a private message, then I can test with that. It probably contains some quoted escapes that causes the error and the import doesn’t support that at the moment. Also the xml import is not yet implemented.
Will give it some priority and send you the file as soon I have some update.