From: Stein E. B. <gr...@be...> - 2010-07-23 09:59:16
|
Hi! I'm trying to create a GRAMPS xml file to import into GRAMPS. Background: I've got a lot of stuff that I need to import that is not in any 'useful' format. I was then thinking of converting this into XML and import that into GRAMPS. I have created this file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.3.0//EN" "http://gramps-project.org/xml/1.3.0/grampsxml.dtd"> <database xmlns="http://gramps-project.org/xml/1.3.0/"> <events> <event handle="event-776412720"> <type>Birth</type> <dateval val="1920-03-31" /> </event> <event handle="event-1057945868"> <type>Death</type> <dateval val="2004-12-12" /> </event> <event handle="event-1879089963"> <type>Burial</type> <dateval val="2004-12-20" /> </event> <event handle="event-977199748"> <type>Birth</type> <dateval val="1920-03-31" /> </event> </events> <people> <person handle="person-1106961350"> <name type="Birth Name"> <first>first</first> <last>last</last> </name> <eventref hlink="event-776412720" role="Primary"> </eventref> <eventref hlink="event-1057945868" role="Primary"> </eventref> <eventref hlink="event-1879089963" role="Primary"> </eventref> </person> <person handle="person-970495359"> <name type="Birth Name"> <first>second</first> <last>last</last> </name> <eventref hlink="event-977199748" role="Primary"> </eventref> </person> </people> </database> As a attempt in creating a minimal XML file, but this one does not import. It fails with this message: 304462: ERROR: dbloader.py: line 247: Failed to import database. Traceback (most recent call last): File "/usr/share/gramps/gui/dbloader.py", line 237, in do_import self._pulse_progress) File "/usr/share/gramps/plugins/import/ImportXml.py", line 119, in importData info = parser.parse(xml_file, line_cnt, person_cnt) File "/usr/share/gramps/plugins/import/ImportXml.py", line 749, in parse self.p.ParseFile(ifile) File "/usr/share/gramps/plugins/import/ImportXml.py", line 2349, in startElement f(attrs) File "/usr/share/gramps/plugins/import/ImportXml.py", line 1793, in start_dateval date_value = self.event.get_date_object() AttributeError: 'NoneType' object has no attribute 'get_date_object' Which 'date' object are we talking about here? Or if anyone have a example of a minimal XML file that can be imported. I don't want to add the id="" as I want GRAMPS to select that itself when importing. -- Stein Erik Berget |