UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 103: ordinal not in range(128)

Bug #1470072 reported by Alvaro Uria on 2015-06-30
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-builddeb
Undecided
Unassigned

Bug Description

Hi,

When running "bzr builddeb -S", I get the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 103: ordinal not in range(128)

Full output is here: http://pastebin.ubuntu.com/11798446/

Locale is: es_ES.UTF-8.

Please let me know if you'd need any more details.

Cheers,
-Alvaro.

Revision history for this message
Vincent Ladeuil (vila) wrote :

  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/builddeb/util.py", line 211, in find_changelog
    raise UnparseableChangelog(str(e))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 103: ordinal not in range(128)

So the changelog around character 103 should give some clue ?

affects: bzr → bzr-builddeb
Revision history for this message
James Westby (james-w) wrote :

Hi,

It's throwing that error when trying to report that the changelog is unparseable.

What's the start of your debian/changelog file?

Thanks,

James

Revision history for this message
Alvaro Uria (aluria) wrote :

Hi,

debian/changelog contained:
 -- Alvaro Uría <email_addr> Tue, 30 Jun 2015 11:00:34 +0200

I replaced "Uría" (with accent) by "Uria" (in ascii), and that did the work around. In fact, I removed all accents on utf-8 files to become us-ascii.

Cheers,
-Alvaro.

Revision history for this message
William Grant (wgrant) wrote :

Did you manually construct that changelog rather than using "dch -i"? There should be two spaces between the email address and date: "> Tue" instead of "> Tue".

Revision history for this message
William Grant (wgrant) wrote :

Oh, nevermind there are actually two spaces there.

Revision history for this message
James Westby (james-w) wrote :

Hi,

The error you saw was because the changelog was unparseable. There may have
been a legitimate problem with the format, or it may be that the changelog library
(python-debian) can't handle non-ascii. It defers the parsing to dpkg, and has demonstrably
handled non-ascii in other cases, so that seems unlikely.

The second issue is that the error handling code calls str() on the error, which can
cause encoding errors, hiding the original error.

Thanks,

James

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers