Bug 248078 - "yum info all" fails.
Summary: "yum info all" fails.
Keywords:
Status: CLOSED DUPLICATE of bug 245445
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-13 03:19 UTC by Stephen J Alexander
Modified: 2014-01-21 22:58 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-07-16 00:13:46 UTC
Type: ---
Embargoed:


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

Description Stephen J Alexander 2007-07-13 03:19:07 UTC
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 Stephen J Alexander 2007-07-13 03:25:01 UTC
May be due to the aterm pkg entries and perhaps others. 


Comment 2 Allan Engelhardt 2007-07-14 19:12:28 UTC
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 21:00:10 UTC
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-16 00:13:46 UTC

*** 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.