import_from_csv_file (DAL) broken in 2.8.2?

23 views
Skip to first unread message

David Manns

unread,
Dec 23, 2013, 11:26:18 AM12/23/13
to web...@googlegroups.com
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?
Reply all
Reply to author
Forward
0 new messages