4

I am running a rake db:seed saving multiple CSV files into my db models. When the seed program gets to the beginning of the third csv file I get this error:

Unquoted fields do not allow \r or \n (line 322).

Below is line 322 the error message points out, it is formatted the same as the other lines in my file

66455049,17:47:16,17:47:16,13155,18,"Desplaines/Harrison",0,13885

Reuben
  • 701
  • 1
  • 9
  • 17
  • one of your rows has at least 1 missing "column", you should check 322, 321 and 323 – Marian Theisen Sep 04 '13 at 21:13
  • The rows above and below line 322 have all the appropriate information filled in – Reuben Sep 04 '13 at 21:17
  • Are you able to look at your file using `od` or something similar? You could well have a spurious or missing character at the end of the line that is causing your problem. –  Sep 04 '13 at 21:19

2 Answers2

0

Similar to the solution found here Rails FasterCSV "unquoted fields do not allow \r or \n" I copied and pasted the information into a new csv file not making any changes to the format and the seed program worked.

Community
  • 1
  • 1
Reuben
  • 701
  • 1
  • 9
  • 17
0

I had the same problem until I found this answer directing me to quote all column values Rails FasterCSV "unquoted fields do not allow \r or \n"

Community
  • 1
  • 1
Nick Schwaderer
  • 1,030
  • 1
  • 8
  • 21