Bug 1266159

Summary: Python errors when executing dnf with spanish locale
Product: [Fedora] Fedora Reporter: jorge.gonzalez
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-02 09:53:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jorge.gonzalez 2015-09-24 16:01:40 UTC
Description of problem:

A python stack trace show when trying to execute 'dnf -y upgrade' as root.

Version-Release number of selected component (if applicable):

- Fedora 22, fully up to date as of Sep 24th 2015.
- dnf-1.1.1-2.fc22.noarch

How reproducible:

Always




Steps to Reproduce:

On a system with a spanish locale, enter:


[root@bespin ~]# echo $LANG
es_ES.UTF-8
[root@bespin ~]# dnf -y upgrade

Actual results:

[root@bespin ~]# dnf -y upgrade
Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 198, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 117, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1007, in configure
    self.optparser.usage = self.optparser.get_usage()
  File "/usr/lib/python2.7/site-packages/dnf/cli/option_parser.py", line 273, in get_usage
    usage += "%-25s %s\n" % (name, summary)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 40: ordinal not in range(128)


Expected results:

Upgrade starts correctly.

Additional info:

When overriding the locale, it works as expected:

[root@bespin ~]# LANG=C dnf -y upgrade
Last metadata expiration check performed 0:15:05 ago on Thu Sep 24 17:45:09 2015.
Dependencies resolved.
Nothing to do.
Complete!
[root@bespin ~]# 

It seems that there's some problem with an Unicode translated message for DNF, which is in the Spanish locale but not on the English one.

Comment 1 Michal Luscon 2015-10-02 09:53:57 UTC

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