I am trying to run a script with following:
- Create data.csv file through text editor
- Pass IDs from data.csv to pull different accounts (Succuess)
- Extract 4, 5 different parameters and store in Variables (Succuess)
- Use appendToCSV function to write the updated values to CSV.
When writing to the file using Katalon Recorder I am getting the error below even I verified the Columns manually.
[error] The amount of data miss match the amount of column in data file
Is there any other function or what is missing ?Please help.
How many CSV file(s) do you have? 1 file, or 2 files?
I guess, it is likely that KatalonRecorder implicitly assumes that you will use 1 input file and another 1 output file; it does not support the case where your test overwrites a single file.
Please try to use 2 files; read
data.csv, write into another file
@asad.hussain The issue you have isn’t an issue to do with files being used for I/O purposes, the issue you have is a data structure one.
KAR it turns out is finicky about the structure of the data it expects to find in the destination CSV file. You mentioned that it has the required CSV headers… Turns out that this is not enough. You need the first row under the header also populated (e.g. with the same number of columns), without this, it’ll throw that error.
It feels like this is a bug, but at least there is this workaround.
This is the CSV structure when your operation should work:
Whereas, just using the following throws the error you’re expecting:
@vu.tran Do you know if what is described here (re behaviour) is expected / intentional, or a possible bug?