Bug 1025650

Summary: [abrt] dnf-0.4.6-1.fc20: i18n.py:119:ucd:UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 51: ordinal not in range(128)
Product: [Fedora] Fedora Reporter: Kevin Raymond <kraymond>
Component: dnfAssignee: Zdeněk Pavlas <zpavlas>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jzeleny, lnie, packaging-team-maint, pnemade, rholy, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/37f9a2e9e90c391dde651d4bc46734655a5df54c
Whiteboard: abrt_hash:8fa28e4ace7c10e1b305bb07322d1f27e7fe2a09
Fixed In Version: dnf-0.4.7-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-16 07:11:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Kevin Raymond 2013-11-01 08:09:43 UTC
Description of problem:
Removing all dnf dependencies with yum (as dnf was broken since last testing)
Installing dnf from testing rep to get this build: 
https://admin.fedoraproject.org/updates/FEDORA-2013-20406/dnf-0.4.6-1.fc20,libsolv-0.4.0-1.gitd49d319.fc20,librepo-1.3.0-1.fc20,hawkey-0.4.4-1.fc20

This error appear at dnf search xx

Version-Release number of selected component:
dnf-0.4.6-1.fc20

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python /bin/dnf search lat
executable:     /bin/dnf
kernel:         3.11.6-301.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
i18n.py:119:ucd:UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 51: ordinal not in range(128)

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 277, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 133, in _main
    result, resultmsgs = cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1361, in run
    return self.command.doCommand(self.base.basecmd, self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 1226, in doCommand
    return self.cli.search(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1421, in search
    _print_match_section(section_text, matched_needles)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1390, in _print_match_section
    print(ucd(formatted))
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 119, in ucd
    return unicode(str(obj), _guess_encoding())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 51: ordinal not in range(128)

Local variables in innermost frame:
obj: u'============================================ Non sp\xe9cifi\xe9, correspond \xe0\xa0: lat ============================================'

Comment 1 Kevin Raymond 2013-11-01 08:09:52 UTC
Created attachment 818168 [details]
File: backtrace

Comment 2 Kevin Raymond 2013-11-01 08:09:56 UTC
Created attachment 818169 [details]
File: environ

Comment 3 Kevin Raymond 2013-11-01 08:22:06 UTC
# echo $LANG
fr_FR.UTF-8

# LANG=C dnf search tor
is working.

But with local settings, it does not.

python-librepo-1.3.0-1.fc20.x86_64
python-hawkey-0.4.4-1.fc20.x86_64   
librepo-1.3.0-1.fc20.x86_64.rpm           
python-librepo-1.3.0-1.fc20.x86_64   
libsolv-0.4.0-1.gitd49d319.fc20.x86_64
dnf-0.4.6-1.fc20.noarch             
hawkey-0.4.4-1.fc20.x86_64

Comment 4 Zdeněk Pavlas 2013-11-01 10:47:13 UTC
Confirmed, thanks for reporting this!

Comment 5 Zdeněk Pavlas 2013-11-01 11:34:58 UTC
Fixed in commit a717373.

Comment 7 Fedora Update System 2013-11-11 13:43:57 UTC
dnf-0.4.7-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.7-1.fc20

Comment 8 Fedora Update System 2013-11-12 00:40:28 UTC
Package dnf-0.4.7-1.fc20, hawkey-0.4.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.7-1.fc20 hawkey-0.4.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-21117/hawkey-0.4.5-1.fc20,dnf-0.4.7-1.fc20
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-11-16 07:11:05 UTC
dnf-0.4.7-1.fc20, hawkey-0.4.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.