Hi, I'm using the last web2py release on localhost with python-2.5.4 on a LFS based system. I'm trying to import a CSV file through the web2py interface, I have tried several CVS output,but everytime,I've got the same error which is "unable to parse csv file"
Here is the sqlite database created with web2py : db.py : <code> #!/usr/bin/python # -*- coding: utf-8 -*- db = SQLDB('sqlite://bddpackages.db') db.define_table("packages", SQLField("nom","string",length=32,notnull=True,default=""), SQLField ("description","string",length=128,notnull=True,default=""), SQLField("url","string",length=64,notnull=True,default=""), SQLField("packager","string",length=64,default=""), SQLField("categorie","string",length=32,default="")) </code> Here is the CSV file that I have made (a package database), it's the output of (prt-get is a package manager) : <code> $ prt-get printf "\"\",\"%n\",\"%d\",\"%u\",\"%P\",\"cat\"\n" >> /tmp/ db_packages.csv </code> Yes, the first line of this file is written by myself (I saw that line when I have exported a little database made by hand) <code> packages.id,packages.nom,packages.description,packages.url,packages.packager,packages.categorie "","AfterStep","Gestionnaire de fenĂȘtres","http:// www.afterstep.org/","geanbrun","cat" "","ICU","International Components for Unicode for C","http://www.icu- project.org/","","cat" "","LibVNCServer","seveur VNC","http:// libvncserver.sourceforge.net/","floreal.c at orange dot fr","cat" "","MesaLib","OpenGL compatible 3-D graphics library","http:// mesa3d.sourceforge.net","Thierry Nuttens, thierryn1 at hispeed dot ch","cat" "","Mowitz","Librairie pour siag","http://siag.nu/","","cat" ... ... ... </code> > 1100 lines Maybe because the first ""(packages.id) is empty instead of being "1","2","3","4"... but don't see how to do this automatically. I will be very pleased if someone have a clue. Thanks. ++ fredg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---