Bug 1266159 - Python errors when executing dnf with spanish locale
Summary: Python errors when executing dnf with spanish locale
Keywords:
Status: CLOSED DUPLICATE of bug 1262082
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-24 16:01 UTC by jorge.gonzalez
Modified: 2015-10-02 09:53 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-10-02 09:53:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


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