Bug 807619 - useless traceback instead error-messages
useless traceback instead error-messages
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 06:54 EDT by Harald Reindl
Modified: 2014-01-21 18:21 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-05 05:14:29 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)

  None (edit)
Description Harald Reindl 2012-03-28 06:54:13 EDT
the following output happens way to often with
dependcy problems - i can remember times were
yum created useful errormessages with them 
you could solve nearly any dep-trouble by
a temporary "rpm -e --nodpes"

currently i am sitting here wild guessing what package 
to remove for upgrade a testmachine F15->F16

Führe rpm_check_debug durch
FEHLER mit rpm_check_debug gegen depsolve:
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 267, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 203, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 524, in doTransaction
    print to_utf8(msg)
  File "/usr/lib64/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)
Comment 1 Zdeněk Pavlas 2012-03-29 04:31:47 EDT
I can't reproduce this bug.  to_utf8() didn't fail, since it's frame is not included in the traceback.  So, it must have returned an utf8-encoded str.  

'print' then tries to *decode* it from ascii to unicode and fails, obviously.  But I have no idea why Python does that.  Perhaps there's some implicit str => unicode conversion?

# this is what we want to do
$ python -c "print u'\u011b'.encode('utf8')"

# this is what Python does
$ python -c "print u'\u011b'.encode('utf8') + u''"

What locale setting are you using?
Which Python version?
Comment 2 Harald Reindl 2012-03-29 05:47:56 EDT
it was a F15 with recent updates
german locale

it happened by "yum --releasever=16 distro-sync" on a machine with only internal repos which had clamav-packages which are removed from the repo

the strange is taht dependencies are completly solved
and this happen while depsolve after confirm / download

"yum remove clamav\*" solved the issue
but i remember times where "depsolve" gave useful output in such cases
Comment 3 Zdeněk Pavlas 2012-04-05 05:14:29 EDT
commit 74d21178642387998245f49d47353f3f5a84aef2

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