Bug 480440

Summary: UnicodeDecodeError when updating package with zh_CN locale
Product: [Fedora] Fedora Reporter: Lubomir Rintel <lkundrak>
Component: PackageKitAssignee: Richard Hughes <richard>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 10CC: jianliang79, lbndev, lkundrak, lmacken, rhughes, richard, robin.norwood, tuxbrewr, whistler
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 0.3.15-2.fc10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 477158 Environment:
Last Closed: 2009-02-16 16:08:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lubomir Rintel 2009-01-17 10:57:06 UTC
+++ This bug was initially created as a clone of Bug #477158 +++

--- Additional comment from jianliang79 on 2009-01-15 08:47:40 EDT ---

...
    It said no package is marked as updated, then I download inkscape-0.46-6.fc10.1 directly from a fedora repository mirror, but encountered the following error when I installing the rpm package:

Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Value: 'ascii' codec can't decode byte 0xe6 in position 57: ordinal not in range(128)
  File : /usr/lib/python2.5/site-packages/yum/rpmtrans.py, line 376, in callback
    self._instProgress( bytes, total, h )
  File : /usr/lib/python2.5/site-packages/yum/rpmtrans.py, line 457, in _instProgress
    self.complete_actions, self.total_actions)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2151, in event
    self._showName(self.info_actions[action])
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2144, in _showName
    self.base.package(package_id, status, self.curpkg.summary)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 235, in package
    PackageKitBaseBackend.package(self, package_id, status, summary)
  File : /usr/lib/python2.5/site-packages/packagekit/backend.py, line 109, in package
    print >> sys.stdout, "package\t$s\t$s\t$s" $ (status, package_id, summary)

--- Additional comment from lkundrak on 2009-01-15 16:49:53 EDT ---

You can install the package from command line: rpm -Uvh "downloaded-file.rpm"

I'm still interested in how did you get the above backtrace. Which tool did you try to use to install the package? Can you reproduce the issue?

--- Additional comment from lkundrak on 2009-01-15 16:56:13 EDT ---

Also, I'm wondering which locale (language setting) do you use? Obtain it with:
echo $LC_ALL

--- Additional comment from jianliang79 on 2009-01-16 07:37:38 EDT ---

    I successfully installed the package "inkscape-0.46-6.fc10.1" by command lineļ¼Œand it works fine now.

    the backtrace above is displayed when I double click the file "inkscape-0.46-6.fc10.1.rpm" in desktop and after a few step, the error message is displayed in a dialog, I guess this is outputed by yum. I am curious about what's the difference between double click a rpm package to install it and type rpm xxx command in a terminal to install it.

    as for may locale:

LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

Comment 1 Richard Hughes 2009-01-19 12:22:05 UTC
What version PackageKit? Thanks.

Comment 2 liang jian 2009-01-22 10:32:53 UTC
rpm -qa | grep PackageKit

PackageKit-gstreamer-plugin-0.3.12-1.fc10.i386
PackageKit-udev-helper-0.3.12-1.fc10.i386
PackageKit-yum-0.3.12-1.fc10.i386
PackageKit-yum-plugin-0.3.12-1.fc10.i386
PackageKit-0.3.12-1.fc10.i386
PackageKit-glib-0.3.12-1.fc10.i386

Comment 3 Whistler 2009-02-16 04:25:42 UTC
it seems this usually happens when the full path of the RPM contains non-ascii characters, e.g., by putting the RPM to the Desktop when using Chinese locale (the directory name is in Chinese in this case).

Comment 4 Richard Hughes 2009-02-16 16:08:41 UTC
commit 09aede02e813cf531ee6c3ecb86c7c7d296a6971
Author: Richard Hughes <richard>
Date:   Mon Feb 16 16:07:23 2009 +0000

    yum: don't backtrace with an internal error when the filename is not unicode. Fixes rh#480440

Comment 5 Richard Hughes 2009-03-27 13:45:03 UTC
I'll do a new upstream release of PackageKit on Monday, and push an update to F10.

Comment 6 Richard Hughes 2009-03-27 13:45:12 UTC
*** Bug 484288 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2009-03-30 11:19:36 UTC
PackageKit-0.3.15-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/PackageKit-0.3.15-1.fc10

Comment 8 Fedora Update System 2009-04-14 15:55:19 UTC
PackageKit-0.3.15-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.