Bug 248078 - "yum info all" fails.
"yum info all" fails.
Status: CLOSED DUPLICATE of bug 245445
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-12 23:19 EDT by Steve Alexander
Modified: 2014-01-21 17:58 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-07-15 20:13:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Outline patch to /usr/share/yum-cli/output.py (845 bytes, patch)
2007-07-14 17:00 EDT, Allan Engelhardt
no flags Details | Diff

  None (edit)
Description Steve Alexander 2007-07-12 23:19:07 EDT
Description of problem:
"yum info all" fails.

Version-Release number of selected component (if applicable):
yum-3.2.1-1.fc7

How reproducible:
100%

Steps to Reproduce:
1.type command: "yum info all"
2.
3.
  
Actual results:
[root@nidula ~]# yum info all >/tmp/gold
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 266, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 164, in doCommand
    base.listPkgs(ypl.installed, 'Installed Packages', basecmd)
  File "/usr/share/yum-cli/output.py", line 102, in listPkgs
    self.infoOutput(pkg)
  File "/usr/share/yum-cli/output.py", line 73, in infoOutput
    print _("Description:\n%s") % pkg.description.encode("UTF-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 96: ordinal
not in range(128)


Expected results:
No stderr output.

Additional info:
I suspect there is an error in the repo as the ultimate cause.  still yum
shouldn't crash.
Comment 1 Steve Alexander 2007-07-12 23:25:01 EDT
May be due to the aterm pkg entries and perhaps others. 
Comment 2 Allan Engelhardt 2007-07-14 15:12:28 EDT
This was supposed to have been fixed by Bug 244080 in yum-3.2.1-1 , but I can
confirm that it is still an issue:

# rpm -q yum
yum-3.2.1-1.fc7
# yum info cups.x86_64
Loading "fastestmirror" plugin
Loading "kernel-module" plugin
Loading "installonlyn" plugin
Loading mirror speeds from cached hostfile
livna                     100% |=========================| 2.1 kB    00:00     
fedora                    100% |=========================| 2.1 kB    00:00     
updates-debuginfo         100% |=========================| 1.9 kB    00:00     
fedora-debuginfo          100% |=========================| 1.9 kB    00:00     
updates                   100% |=========================| 1.9 kB    00:00     
moertel-community         100% |=========================|  951 B    00:00     
Installed Packages
Name   : cups
Arch   : x86_64
Epoch  : 1
Version: 1.2.11
Release: 2.fc7
Size   : 8.8 M
Repo   : installed
Summary: Common Unix Printing System

Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 266, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 164, in doCommand
    base.listPkgs(ypl.installed, 'Installed Packages', basecmd)
  File "/usr/share/yum-cli/output.py", line 102, in listPkgs
    self.infoOutput(pkg)
  File "/usr/share/yum-cli/output.py", line 73, in infoOutput
    print _("Description:\n%s") % pkg.description.encode("UTF-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 75: ordinal
not in range(128)
Comment 3 Allan Engelhardt 2007-07-14 17:00:10 EDT
Created attachment 159273 [details]
Outline patch to /usr/share/yum-cli/output.py

DISCLAIMER: I am not a habitual Python programmer and not an expert on its
Unicode handling.  The attached patch is quite possibly inefficient and may
well introduce subtle new bugs.

But: The attached patch to /usr/share/yum-cli/output.py does appear to resolve
the issues, at least with the current repository information.  That is

# yum info all > /tmp/all.info

runs without problems and the output looks reasonable from a quick scan
(including looking at cups).

Sorry if the diff is not in the right format etc., but I am new to this and it
is only a short change.
Comment 4 Jeremy Katz 2007-07-15 20:13:46 EDT

*** This bug has been marked as a duplicate of 245445 ***

Note You need to log in before you can comment on or make changes to this bug.