I have saved the database on the production server with
db.export_to_csv_file(open('backup.csv'),'rb').

On my development-environment I dropped the database (postgresql), created a
new empty one and the following happened when I tried to import the backup:

db.import_from_csv_file(open('/Users/js/Programmeer/zenex/produksie/backup.csv'),'rb')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/js/Programmeer/zenex/web2py/gluon/sql.py", line 1488, in
import_from_csv_file
    self[tablename].import_from_csv_file(ifile, id_map, null, unique, *args,
**kwargs)
  File "/Users/js/Programmeer/zenex/web2py/gluon/sql.py", line 2152, in
import_from_csv_file
    id_map_self[line[cid]] = new_id
UnboundLocalError: local variable 'id_map_self' referenced before assignment

Version: Version 1.89.1 (2010-11-12 15:14:36)

Is this a bug or did I do something wrong?

Regards
Johann
-- 
 May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord!  His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
                                                    2 Pet. 1:2b,3a

Reply via email to