I found my problem. Turns out saving a CSV file in excel will add trailing commas for empty cells, so after "END" in the original CSV file, there would be ",,,," for each empty cell (based on the number of column fields).
On Saturday, July 28, 2012 12:23:20 PM UTC-7, Mark Li wrote: > > I used > > db.export_to_csv_file(open('somefile.csv', 'wb')) > > to export my database, but when I try to import it with > > db.import_from_csv_file(open('somefile.csv', 'rb')) > > I get the following error > > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "C:\users\mark\documents\dubliners\web2py\gluon\dal.py", line 6446, in > im > port_from_csv_file > raise SyntaxError, 'invalid file format' > SyntaxError: invalid file format > > > I've tried emptying the database and re-creating the datatables, but nothing > is working so far. > > --