Import oopses: EmailAddressAlreadyTaken

Bug #411514 reported by Данило Шеган
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jeroen T. Vermeulen

Bug Description

Similarly to bug #408528 in Soyuz, when we are importing translations from people who have not registered in Launchpad (i.e. there is no Person record for them), but who do have an account (i.e. there is Account and EmailAddress record for them), imports fail with

Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/scripts/po_import.py", line 104, in run
    (mail_subject, mail_body) = (
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/model/pofile.py", line 1026, in importFromQueue
    errors, warnings = (
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 335, in importFile
    file_importer = POFileImporter(
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 692, in __init__
    self.last_translator = self._getPersonByEmail(email, name)
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/utilities/translation_import.py", line 741, in _getPersonByEmail
    displayname=name, comment=comment)
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/registry/model/person.py", line 2459, in createPersonAndEmail
    email = getUtility(IEmailAddressSet).new(
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/canonical/launchpad/database/emailaddress.py", line 116, in new
    raise EmailAddressAlreadyTaken(
EmailAddressAlreadyTaken: The email address '...' is already registered.

Discussing this with Salgado, the problem is that we are using Account/Person split to indicate if someone has explicitely registered to use Launchpad or not. Yet, in Translations we do need Person records, so we need to create them anyway.

Proper, long-term fix will involve adding separate field to person records indicating whether that person is using LP or not (i.e. it was created automatically). As a short-term fix, we can add Person records with a new creation rationale like POFILEIMPORT_NOTYETUSINGLAUNCHPAD (and equate it to POFILEIMPORT wherever we are using POFILEIMPORT).

To help with a test case, we have seen this with French upload at https://translations.launchpad.net/felo/+imports

Work-around for users: modify Last-Translator to use a different email address, preferrably of the same person. Note that translations will be creditted to Last-Translator, so if you get it wrong, a wrong person might get the credit for somebody else's work.

Problem reported by Torsten Bronger (https://launchpad.net/~bronger)

Related branches

tags: added: rosetta-imports
description: updated
Revision history for this message
Christian Reis (kiko) wrote :

Why not do the proper fix now? It seems much more reasonable to do that and just update the code once then to have to do it twice!

Revision history for this message
Данило Шеган (danilo) wrote :

What is the proper fix? Salgado wanted to discuss it further on the list, so that's what I did, started a thread on launchpad-dev.

It initially seems the proper fix would be to add a new DB column to keep track of whether Person's account was ever activated in Launchpad (I discuss one alternative approach on the list). Also, if proper fix is done for #408528, there's nothing we'd need to do, or at most, minimal changes would be required (i.e. to use new API if any is introduced).

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think I got similar import error. I will keep it around for developers to investigate:

https://translations.edge.launchpad.net/xiphos/translate/+imports

 pt.po in Xiphos translate series
Failed
 The email address '<email address hidden>' is already registered.
Uploaded by Dmitrijs Ledkovs on 2009-12-09 20:50:23 GMT
Will be imported into Portuguese (pt) translation of xiphos in Xiphos translate

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Dmitrijs, yes, that does seem to be what happened there. The entry will be gone by now, but it's OOPS-1439POI1

tags: added: oops
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Other recent examples (we're getting about one a day on average): OOPS-1484POI1 OOPS-1484POI2 OOPS-1484POI3 OOPS-1484POI4 OOPS-1485POI1 OOPS-1486POI1 OOPS-1487POI1

summary: - Silent PO import failures: EmailAddressAlreadyTaken
+ Import oopses: EmailAddressAlreadyTaken
Changed in rosetta:
assignee: nobody → Jeroen T. Vermeulen (jtv)
milestone: none → 10.02
status: Triaged → In Progress
Revision history for this message
Ursula Junque (ursinha) wrote : A commit mentioned this bug
Changed in rosetta:
status: In Progress → Fix Committed
tags: added: qa-needstesting
tags: added: qa-ok
removed: qa-needstesting
Changed in rosetta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.