GRAMPS does not support merge, so on import of the same data all kind of strange things happen: some are overwritten, some are duplicated wrongly, ....

Best is to go back to the situation of before the import if possible, and selectively import pieces of the other database you need. That is, you can for example import that database in another database, and delete the duplicates before importing in the original.

If none of above is possible, you need to clean the present database:
1/export to .gramps file to have a backup
2/run the rebuild reference tables tool, and rebuild secondary index tool
3/run the check and repair tool
4/delete duplicates

repeat 2/ and 3/ on crashes
On delete that is impossible to achieve, write down the gramps id, export data to .gramps file, extract the .gramps file (it is a zip file) and open the containing file in an editor. Search for the gramps id you need to delete, and delete that record with the text editor (eg for a person everything between and including <person>  ... </person>)
Then import in an empty database, and redo 2/ and 3/, ....

Benny

2009/4/2 Vladimir Bellemo <C21Vlad@aol.com>
User Information:
===================

I had imported the database from another hard drive to the one I'm using now.
Then I got duplicate records with the same ID #. For example, under my
parents, it would show them as having me as a son twice and my brother also
twice, but with my ID repeating itself on the list and my brother's ID too.
My first thought was to delete Gramps and re-install it to solve the problem
(maybe with a new version the problem would go away. Well, it didn't).
So, I thought: maybe if I delete myself and my brother from the tree and
re-enter ourselves again, the program is going to eliminate the duplicate
records. That's when it crashed.
Any suggestions on how to eliminate the duplicate records without re-entering
all the information in  a new database?
Thanks a million.



Error Details:
===================

479653: ERROR: gramps.py: line 148: Unhandled exception
Traceback (most recent call last):
 File "/usr/share/gramps/Editors/_EditFamily.py", line 792, in save
   self.__do_save()
 File "/usr/share/gramps/Editors/_EditFamily.py", line 900, in __do_save
   self.db.transaction_commit(trans, _("Edit Family"))
 File "/usr/share/gramps/GrampsDb/_GrampsBSDDB.py", line 1417, in
transaction_commit
   self.reference_map.delete(str(key),txn=self.txn)
DBNotFoundError: (-30989, 'DB_NOTFOUND: No matching key/data pair found')


System Information:
===================

Python version: 2.5.2 (r252:60911, Jul 31 2008, 17:31:22) [GCC 4.2.3 (Ubuntu
4.2.3-2ubuntu7)]
BSDDB version: 4.4.5.3
Gramps version: 2.2.10-1
LANG: en_US.UTF-8
OS: Linux
Distribution: 2.6.24-23-generic

------------------------------------------------------------------------------
_______________________________________________
Gramps-bugs mailing list
Gramps-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-bugs