Using db.import_from_csv_file(...) to restore a complete database from a 
file created using db.export_to_csv_file(...) used to work.

With 2.8.2 the process (at least in the development environment - I haven't 
tried in production environment) loops forever.

The problem seems to be in gluon\dal.py at line 8414 (#if id_map ...)

   def import_from_csv_file(self, ifile, id_map=None, null='<NULL>',
                             unique='uuid', map_tablenames=None,
                             ignore_missing_tables=False,
                             *args, **kwargs):
        #if id_map is None: id_map={}
        id_offset = {} # only used if id_map is None

Uncommenting this line to initialize id_map seems to fix the problem ... 
don't know why it was commented out, perhaps this breaks some other case?

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to