Discussion:
[Bitpim-devel] duplicate data on import
Roger Binns
2004-11-21 05:55:26 UTC
Permalink
A few of us used to get occasional assertion failures after importing
some data, specifically in the EnsureBitPimSerials function in
phonebook.py.

I have finally tracked down the cause, and am trying to figure out
how to fix it.

The problem occurs when your import source has two records that both
match the same entry in the existing data. This causes BitPim to
have two result records, each being the original record seperately
merged with the imported records. Unfortunately that also results
in the serials being duplicated. And have two records with the
same serials is a *really* bad idea, hence the assertion catching
it.

I'll fix this by making the existing entry pick the highest match
from the imported data.

If someone is looking for a small project, it would be *really*
useful having a test suite for doing data imports. It should
consist of two vcard files. The first gets loaded as clean
data, and the second is then imported. It will also help develop
the importer, since it is weak on some fields.

Roger

Loading...