method OptionParser#exit() from optparse.py causes UnicodeEncodeError on apport-retrace
Bug #905831 reported by
jbatista
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.6 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Running apport-retrace exits with an UnicodeEncodeError simply by running from the console (see bug #905826 for example) on Ubuntu Lucid, amd64.
The line is from method exit() from class OptionParser on file optparse.py.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: python2.6-minimal 2.6.5-1ubuntu6
ProcVersionSign
Uname: Linux 2.6.32-36-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Sat Dec 17 23:37:49 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=
PATH=(custom, user)
LANG=pt_PT.utf8
SHELL=/bin/bash
SourcePackage: python2.6
To post a comment you must log in.
Can be solved by editing method exit() in class OptionParser of file /usr/lib/ python2. 6/optparse. py so that the line write(msg) write(msg. encode( 'utf-8' ))
sys.stderr.
reads instead, for example:
sys.stderr.
This workaround quenches the error in apport-retrace.