in reply to CSV_XS ERROR: 2027 - EIQ - Quoted field not terminated @ pos 408

Considering that the error message is "Quoted field not terminated @ pos 408", I suspect that the data actually has embedded quotes. So the choking you're experiencing may just be the fact that some fields are much wider than expected. For example, consider the following CSV data:

"The file has three records", 14.0, 7 "Escape a quote with a backslash, like so: \", but does it work?", 18. +7, 4 "Joe Smith, Esq.", 19.4, 6
Here we have three records, each with a string, a float, and an integer. If your code to parse the CSV file doesn't expect a quote to be escaped with a backslash, it may end the string prematurely, and likely choke when it tries to use "but does it work?" as a float. So check your data for unusual quoting situations, and check whether CSV_XS handles it in the way you expect. (You may have to change some settings...)

...roboticus

  • Comment on Re: CSV_XS ERROR: 2027 - EIQ - Quoted field not terminated @ pos 408
  • Download Code

Replies are listed 'Best First'.
Re^2: CSV_XS ERROR: 2027 - EIQ - Quoted field not terminated @ pos 408
by mnooning (Beadle) on May 23, 2010 at 00:32 UTC
    I write this in case anyone else runs into this. First, thank you all for working on this. The data I pasted to show the problem was actual data, but the strings in it were shortened for clarity. As for the final solution, I upgraded Text-CSV_XS from 0.67 to 0.73. It did not seem to help at first, but after I rebooted I cannot get it to fail. This has driven me half crazy.
    Again, thanks.