AppAdmin: CSV import bug

224 views
Skip to first unread message

DJ

unread,
Aug 8, 2013, 1:07:38 AM8/8/13
to web...@googlegroups.com

Not able to upload data using CSV import tool, get the following error  (perhaps, web2py csv import tool needs to read it in using 'rU' option?) -

Running Version 2.5.1, Python 2.7, MacOSX. Tested it using a csv file exported out using appadmin's Export/Import tool.

Unable to parse CSV file:
new-line character seen in unquoted field - do you need to open the file in universal-newline mode?

Massimo Di Pierro

unread,
Aug 8, 2013, 4:29:31 AM8/8/13
to web...@googlegroups.com
Hard to say without an example.

Andy W

unread,
Nov 22, 2013, 5:49:37 AM11/22/13
to web...@googlegroups.com
Just come across the same problem -  using ver 2.7.4 with pythonanywhere.com

The issue seems to be with the csv files created by Excel (I am on Mac OSX). I have a simple 2-column list of ISO country codes and nationalities on an Excel spreadsheet. Saving from Excel to CSV creates a file that, when uploading, creates the above error message. If I use OpenOffice to write the CSV file it uploads without an issue.

Dave S

unread,
Nov 22, 2013, 10:16:57 PM11/22/13
to web...@googlegroups.com
On Friday, November 22, 2013 2:49:37 AM UTC-8, Andy W wrote:
Just come across the same problem -  using ver 2.7.4 with pythonanywhere.com

The issue seems to be with the csv files created by Excel (I am on Mac OSX). I have a simple 2-column list of ISO country codes and nationalities on an Excel spreadsheet. Saving from Excel to CSV creates a file that, when uploading, creates the above error message. If I use OpenOffice to write the CSV file it uploads without an issue.


Have you diffed the 2 files?  Is there a little difference between them or a lot?

/dps

Michael Beller

unread,
May 20, 2014, 2:49:44 PM5/20/14
to web...@googlegroups.com
I'm also using Excel on a Mac and had the same problem.  However, if I select "Windows Comma Separated (.csv)" option rather than the default "Comma Separated Values (.csv)" in the "Save As ..." dialog box the import through the appadmin interface works.

Gary Fung

unread,
Aug 31, 2015, 9:00:45 PM8/31/15
to web2py-users
worked for me doing the same windows comma separated (.csv) option.

Derek

unread,
Sep 1, 2015, 11:38:45 AM9/1/15
to web2py-users
If your CSV file is not RFC-4180 compliant, I would expect it not to work. RFC-4180 calls for CR+LF linefeeds. Your program may just be outputting a single linefeed without the carriage return.
Reply all
Reply to author
Forward
0 new messages