2010/5/27 Doug Blank <doug.blank@gmail.com>
On Thu, May 27, 2010 at 3:14 PM, sturdy <sturdy2@verizon.net> wrote:
> I'm a GRAMPS (3.2.3.-1) and linux newby. I have created a database by
> combining several gedcom files from other genealogy apps. I've cleaned the
> db so there are no longer any noticeable issues (eg, dates, etc). I have run
> the db repair tools and find no problems. And I can export to both .gramps
> and .gpkg files. However, when I create a new db and try to import the
> just-exported xml file, I get the following error message. Can someone
> identify the cause of this issue?
> 65105: 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 111, in
> importData
>    version_is_valid(xml_file, cl) is False:
>  File "/usr/share/gramps/plugins/import/ImportXml.py", line 2479, in
> version_is_valid
>    parser = VersionParser(filename)
>  File "/usr/share/gramps/plugins/import/ImportXml.py", line 2405, in
> __init__
>    self.__p.ParseFile(xml_file)
> ExpatError: not well-formed (invalid token): line 151893, column 249

You could look at line 151,893, column 249 of the file. That should
tell you what the problem is. Probably a ">" or "<" in the wrong

Yes, I have never seen this error before, it comes from the xml library parsing the xml. So indeed, a wrong xml character somewhere.
It indicates also a bug somewhere in the export code. All data must be escaped before writing, eg > must become &gt;, somewhere this is not happening. Eg, you could have a person title with this in and it is forgotten to escape the xml characters in the Gramps write code.
As doug says, please look at that line, column and let us know what data is wrong.
We can then:
1. tell you where in Gramps this data is, so you can change the offending piece.
2. fix the bug in Gramps where a piece of data is written to the xml file unescaped

This can happen from import of GEDCOM, as some programs/users might use codes like &, >, < .


> Also, the unzipped problem .gramps file also fails to import with a similar
> error message. I am able to import the sample xml file I downloaded from the
> gramps site so I'm guessing there is a problem with my data.
> Obviously, my backups are not much good if I cannot import them! Thanks for
> the assist.
> --
> View this message in context: http://gramps.1791082.n4.nabble.com/xml-import-failure-tp2233644p2233644.html
> Sent from the GRAMPS - User mailing list archive at Nabble.com.
> ------------------------------------------------------------------------------
> _______________________________________________
> Gramps-users mailing list
> Gramps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gramps-users


Gramps-users mailing list