Red Hat Bugzilla – Bug 962701
Software Update fails with unicode errors
Last modified: 2015-02-18 08:53:46 EST
Description of problem:
Software update fails with:
Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Value: 'ascii' codec can't decode byte 0xc2 in position 49: ordinal not in range(128)
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 3590, in <module>
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 3587, in main
File : /usr/lib/python2.7/site-packages/packagekit/backend.py, line 722, in dispatcher
File : /usr/lib/python2.7/site-packages/packagekit/backend.py, line 582, in dispatch_command
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2546, in get_details
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2572, in _show_details_pkg
self.details(package_id, license, group, desc, url, size)
File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 303, in details
PackageKitBaseBackend.details(self, package_id, package_license, group, desc, url, bytes)
File : /usr/lib/python2.7/site-packages/packagekit/backend.py, line 239, in details
print("details\t$s\t$s\t$s\t$s\t$s\t$ld" $ (package_id, package_license, _to_utf8(group), _to_utf8(desc), url, bytes), file=sys.stdout)
Version-Release number of selected component (if applicable):
It depends on software updates available. Not all updates trigger the problem. I've had it in the past with different characters, eg.
Error Value: 'ascii' codec can't decode byte 0xe2 in position 111: ordinal not in range(128)
Steps to Reproduce:
1. Run software update (or gpk-update-viewer)
2. processes for a little bit
3. Error appears
In this particular case I was able to trap the "bad" line (unicoded, unfortunately):
details^Ipolicycoreutils;2.1.14-40.fc19;x86_64;updates-testing^IGPLv2^Iother^ISecurity-enhanced Linux is a feature of the LinuxM-BM-. kernel and a number;of utilities with enhanced security functionality designed to add;mandatory access controls to Linux. The Security-enhanced Linux;kernel contains new architectural components originally developed to;improve the security of the Flask operating system. These;architectural components provide general support for the enforcement;of many kinds of mandatory access control policies, including those;based on the concepts of Type EnforcementM-BM-., Role-based Access;Control, and Multi-level Security.;;policycoreutils contains the policy core utilities that are required;for basic operation of a SELinux system. These utilities include;load_policy to load policies, setfiles to label filesystems, newrole;to switch roles.^Ihttp://www.selinuxproject.org^I752912
Created attachment 747613 [details]
Error line (with embedded tabs, I hope)
Created attachment 747617 [details]
possible fix. Just wrap more parameters in _to_utf8()
I can't see an actual reason for unicode in http://www.selinuxproject.org/, policycoreutils;2.1.14-40.fc19;x86_64 or GPLv2. There are in description, but that was already _to_utf8()
Character 49 matches 'M-BM-' in 'LinuxM-BM-', which is (r)egistered, and matches 0xc2, but that's in description. And description was already _to_utf8()
I'd have to guess a Python 2.7 auto up/down cast between str() and unicode() types bug.
I've fixed a load of these kind of problems in f20, can you try there please?
I am running F20 beta now.
F20 seems to have had no updates (all mirrors are empty) for at least a week, so I'll test after F20 final comes out.
The f20-not-working-for-a-week thing is likely that you got a bad yum update,
the fix is here:
Still on yum-3.4.3-111.fc19.noarch
gives me a very limited mirror list (3 sites), and those are basically empty (< 1 kB) hash-filelist/other/primary.gz/bz2.
(never before noticed the mirror list is only 3 sites -- "ZA" and "NA" locations -- I'll have to play with my location settings.)
'kay, different location does have updates (not as many as expected)
First run of gpk-update-viewer went fine.
Downgraded policycoreutils, and used gpk-update-viewer to update it. Updated fine with unicode in package description.
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 19 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.