[Tutor] How to avoid error message: "_csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?"

Judith Flores juryef at yahoo.com
Sat Feb 7 01:58:50 CET 2009


Hello,

   I get the error message above quite often when trying to open some csv files. I noticed that if I open the csv file in excel and delete the "empty" columns at the right end of my data, the error message doesn't appear.

My code looks like this:

myfile=open(csvfile)
reader=csv.reader(myfile)
header=reader.next()

Thank you,

Judith

Let me know if you would like to have some of my csv files.



      


More information about the Tutor mailing list