Getting error The amount of data miss match the amount of column in data file when running a CSV File

I am trying to run a script with following:

  1. Create data.csv file through text editor
  2. Pass IDs from data.csv to pull different accounts (Succuess)
  3. Extract 4, 5 different parameters and store in Variables (Succuess)
  4. Use appendToCSV function to write the updated values to CSV.
    ${Id},${AppName},${AppStatus},${CustodianName},${EscalationName},${Mgr5},${Mgr4},${Mgr3}

CSV Header:
Id,AppName,AppStatus,CustodianName,EscalationName,Mgr5,Mgr4,Mgr3

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.

Thanks,
Asad

@asad.hussain

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 output.csv.

1 Like