rosetta-poimport hits an "AssertionError: No To: header"

Bug #410293 reported by Данило Шеган
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jeroen T. Vermeulen

Bug Description

In rosetta-poimport.log we started seeing a lot of assertion errors like the following:

Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad/cronscripts/rosetta-poimport.py", line 35, in ?
    script.run()
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/services/scripts/base.py", line 244, in run
    self.main()
  File "/srv/launchpad.net/production/launchpad/cronscripts/rosetta-poimport.py", line 26, in main
    process.run()
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/translations/scripts/po_import.py", line 134, in run
    simple_sendmail(
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/services/mail/sendmail.py", line 142, in simple_sendmail
    return ctrl.send()
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/services/mail/sendmail.py", line 256, in send
    return sendmail(self.makeMessage(), self.envelope_to, bulk=self.bulk)
  File "/srv/launchpad.net/production/launchpad-rev-8325/lib/lp/services/mail/sendmail.py", line 320, in sendmail
    assert 'to' in message and bool(message['to']), 'No To: header'
AssertionError: No To: header

Related branches

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

This infests our logfiles and results in an email not going out. Not yet sure how it's happening or why, but it's not a big deal in general (i.e. import succeeds anyway).

Changed in rosetta:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The import succeeds, but the script stops at that point. If this happens a lot, the effect will be to slow down the imports. Worst case, the script processes only 1 file per run. Not too far from what we've been seeing.

As it turns out, the set of contact addresses for a person may be empty. All that's needed is to suppress the sending of email from ImportProcess.run() in that case.

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

In this situation, more urgent than initially suspected.

Changed in rosetta:
assignee: nobody → Jeroen T. Vermeulen (jtv)
importance: Medium → High
milestone: none → 3.0
status: Triaged → In Progress
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Fixed in devel 9351

Changed in rosetta:
status: In Progress → Fix Committed
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.