Branch mail not converting diff to unicode

Bug #371469 reported by Jonathan Lange
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Aaron Bentley

Bug Description

We regularly get OOPS reports saying:
  UnicodeDecodeError: 'ascii' codec can't decode byte INSTANCE-ID in position INT: ordinal not in range(128)

The reports themselves provide little in the way of information, save that the error is in:
  Module canonical.launchpad.mailout.branch, line 247, in _diffText
    contents = "%s\\n%s" % (self.contents, self.diff)

See OOPS-1219BM1, OOPS-1219BM2, OOPS-1219BM3, OOPS-1219BM4, OOPS-1219BM5

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote :

Since diffs are binary and text is unicode, diffs must be converted to unicode before being combined with the message body.

This problem could also be solved by providing diffs as attachments, which would fix bug 297716 . It would also avoid having to guess the encoding of the diff (if there even is a single encoding).

summary: - Branch mail mishandling unicode
+ Branch mail not converting diff to unicode
Aaron Bentley (abentley)
Changed in launchpad-code:
assignee: nobody → Aaron Bentley (abentley)
status: Triaged → In Progress
Aaron Bentley (abentley)
Changed in launchpad-code:
status: In Progress → Fix Committed
Revision history for this message
Savvas Radevic (medigeek) wrote :

Can you let us know when this will be released for edge? Or is it going to be set as "Fix released" when it's in edge?

Revision history for this message
Aaron Bentley (abentley) wrote :

It has already been released to edge, but edge does not send branch mail. It will take effect when the next release of Launchpad is rolled out, as I mentioned in #384217.

Aaron Bentley (abentley)
Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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