读取CSV错误:数据非法.发生了什么? [英] reading CSV error: Illegal Data. What's happening?
本文介绍了读取CSV错误:数据非法.发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到以下错误,我不知道发生了什么事...
I'm having the following error, and I have no idea what's going on...
这是我的csv文件中的第一行(我使用vim打开了它)
Here is the first row in my csv file (I opened it using vim)
longitude,latitude,ph,ammonium_nitrate,phosphate,permanganate,heavy_metal,email_address^M
这是我在野生动物园控制台中看到的错误:
Here is the error I see in my safari console:
[Error] Error: CSVDataError: Illegal Data [Row:1][Col:8]
(anonymous function) (jquery-csv-0.71.js, line 253)
replace
parse (jquery-csv-0.71.js, line 160)
toArrays (jquery-csv-0.71.js, line 664)
success (demo.html, line 64)
c (jquery-1.10.2.min.js, line 4)
fireWith (jquery-1.10.2.min.js, line 4)
k (jquery-1.10.2.min.js, line 6)
r (jquery-1.10.2.min.js, line 6)
任何建议将不胜感激!!非常感谢!
Any suggestions will be appreciated!! Thanks a lot!
推荐答案
该文件似乎是从Windows框中导入的(由于存在^ M字符).如果您在Linux中使用此文件,则解析器可能不喜欢它.从文件中删除^ M.
The file appears to be imported from a windows box (due to the presence of the ^M character). If you are working with this file in linux your parser may not like it. Remove the ^M from your file.
这篇关于读取CSV错误:数据非法.发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文