On Django-1.9.6, django-import-export-0.5
When I try to upload CSV without "id" field throws this error.
Line number: 1 - u'id'
13173474, Harry McDade, 10.harry.asas@asasasas.com
Traceback (most recent call last):
File "/Users/isanka/dev/venv/edxubase/lib/python2.7/site-packages/import_export/resources.py", line 434, in import_row
instance, new = self.get_or_init_instance(instance_loader, row)
File "/Users/isanka/dev/venv/edxubase/lib/python2.7/site-packages/import_export/resources.py", line 258, in get_or_init_instance
instance = self.get_instance(instance_loader, row)
File "/Users/isanka/dev/venv/edxubase/lib/python2.7/site-packages/import_export/resources.py", line 252, in get_instance
return instance_loader.get_instance(row)
File "/Users/isanka/dev/venv/edxubase/lib/python2.7/site-packages/import_export/instance_loaders.py", line 31, in get_instance
field = self.resource.fields[key]
KeyError: u'id'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…