Finally resolved the import. I added a line to 

File "../web2py/gluon/packages/dal/pydal/objects.py"

csv.field_size_limit(500 * 1024 * 1024)

and it worked!

Hope that helped someone. 


On Friday, May 19, 2017 at 9:52:35 AM UTC+8, lyn2py wrote:
>
> My code for exporting/importing is extracted from the book, it is simply:
>
> def export_db():
>     db.export_to_csv_file(open('db_dump.csv', 'wb'))
>     return 
>
> def import_db():
>     db.import_from_csv_file(open('db_dump.csv', 'rb'))
>     return 
>
> I just run the function and out comes the db_dump.csv
> I did not make any changes to that file. I imported back, but ran into the 
> error:
>
> File "../web2py/gluon/packages/dal/pydal/objects.py", line 947, in 
> import_from_csv_file
>     for lineno, line in enumerate(reader):
> Error: field larger than field limit (131072)
>
>
> I don't know if it's the double quotes doubling up, or if some of my 
> "text" type data is too large. I don't understand the error. I need to keep 
> the data, so I dare not play around with it. I thought that it would be a 
> solution that can maintain the integrity of the data.
>
> Please help. Thank you...
>

-- 
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.

Reply via email to