On Thursday, May 21, 2015 at 4:06:34 AM UTC-7, goome wrote: > > hello there is some way to export all the data (that have some type > mismatch from modles/db definitions and real values present) and then > reload cleaned? > i tried with db.export_to_csv_file but give me error : > ValueError: invalid literal for long() > in fact, there are alues that should be double (o decimal) and that > instedad are string (ex.: '27.0' for 27.0) > This cause runtime error > Any tips? >
You may need to use the DB's export tools, rather than the ones in web2py. Are you using sqlite? There are mentions in the the forum archives that sqlite is "looser" in enforcing value typing than MySQL or PostGREs. But exporting from sqlite only requires that you open its shell, make sure the options are set right (like ',' as the separator for delimiter-separated values (CSV, for short)). Options are accessed with the dot-commands (.help to start with), and then either .dump or a SELECT statement. Some of the non-SQL DBs may allow mixing types, but I don't know how to dump those. Their tools should have some documentation, though. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

