Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
PTC ThingWorx Version: 8.4.9 with CSVParser_Extensions
Trying to read and then parse TSV-File.
Can open and read the file with undefined delimiter but as soon as I set the delimter to ";"
I get Error executing service TSV_ParserService. Message :: Unable To Open [testFile.tsv] in [TSV_Repository] : Unexpected end of file while parsing CSV input - See Script Error Log for more details.
[L: ERROR] [O: S.c.t.d.e.DSLProcessor] [I: TSV_Parser] [U: Administrator] [S: ] [T: http-nio-8080-exec-7] [message: Execution error in service script [TSV_ParserService] :: Unable To Open [testFile.tsv] in [TSV_Repository] : Unexpected end of file while parsing CSV input]
at TSV_ParserService:15
var params = {
path: "testFile.tsv" /* STRING */,
columnMappings: undefined /* STRING */,
hasHeader: undefined /* BOOLEAN */,
longitudeField: undefined /* NUMBER */,
dateFormat: undefined /* STRING */,
fileRepository: Things["TSV_Repository"].name /* THINGNAME */,
latitudeField: undefined /* NUMBER */,
fieldDelimiter: undefined /* STRING */,
stringDelimiter: ";" /* STRING */ /* with undefined I can open the file*/,
dataShape: "TSV_TransferShape" /* DATASHAPENAME */
};
// result: INFOTABLE
var result = Resources["CSVParserFunctions"].ReadCSVFile(params);
I followed this example: http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FExtensibility%2FCSVParser.html%23wwID0E65DVB
Some hints (e.g. is encoding like UTF-8 relevant)?
Solved! Go to Solution.
Hi @otluk, I'm not sure but can you check if your CSV file is separated by ";"?
I think commonly, a CSV (Comma-Separated Values) should use "," to separate its fields.
So the undefined delimiter is "," by default, I guess.
Hi @otluk, I'm not sure but can you check if your CSV file is separated by ";"?
I think commonly, a CSV (Comma-Separated Values) should use "," to separate its fields.
So the undefined delimiter is "," by default, I guess.