You need to define the appropriate csv.QOUTES type. You probably have csv.QOUTES_MINIMAL (which is the web2py default)
Try the following import csv db(query).select().export_to_csv_file(s, delimiter=',', quotechar='"', quoting=csv.QUOTE_NONNUMERIC) db.import_from_csv_file(s, delimiter=',', quotechar='"', qouting=csv.QOUTE_NONNUMERIC) -Thadeus On Wed, Jan 27, 2010 at 10:11 AM, mdipierro <mdipie...@cs.depaul.edu> wrote: > this sounds like a bug but more of a bug in the csv module than in > web2py. > Anyway, it needs some testing. I will put this in my queue but it > would help if somebody else can also look into this. The only export/ > import functions are in gluon/sql.py (for Table and for SQLDB). > > On Jan 27, 8:55 am, Praneeth <life...@gmail.com> wrote: > > Hello folks, > > > > I was wondering if anyone faced this problem before. I was migrating a > > database from sqlite to MySQL and had to do a db.export_to_csv_file. My > > database contains strings with a carriage return. Seems like the export > > creates carriage returns in the CSV file resulting in a failure when > > doing a db.import_from_csv_file. I manually removed the carriage returns > > from my file for a successful import. > > > > -- > > Praneeth > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com<web2py%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.