I am trying to write to a csv file via the following
file = open(\'P:\\test.csv\', \'a\') fieldnames = (\'ItemID\', \'Factor\', \'FixedAmount\') wr = csv.D
I had this problem and it was because I was using \n\r. I changed to \n and it is working now.