Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1155877 - [abrt] dnf: i18n.py:130:ucd:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Summary: [abrt] dnf: i18n.py:130:ucd:UnicodeDecodeError: 'ascii' codec can't decode by...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a4a066cf2ed9066f7237ca728d2...
: 1152732 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-23 04:52 UTC by Vít Ondruch
Modified: 2015-02-20 08:32 UTC (History)
7 users (show)

Fixed In Version: hawkey-0.5.3-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-20 08:32:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.34 KB, text/plain)
2014-10-23 04:52 UTC, Vít Ondruch
no flags Details
File: environ (1.82 KB, text/plain)
2014-10-23 04:52 UTC, Vít Ondruch
no flags Details

Description Vít Ondruch 2014-10-23 04:52:38 UTC
Description of problem:
Setting locales to LANG=C makes DNF crash.

Version-Release number of selected component:
dnf-0.6.2-1.fc22

Additional info:
reporter:       libreport-2.3.0
cmdline:        /usr/bin/python -OO /bin/dnf history list all
executable:     /bin/dnf
kernel:         3.17.0-1.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
i18n.py:130:ucd:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

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 182, 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 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1086, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/__init__.py", line 1205, in run
    ret = self.output.historyListCmd(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 1353, in historyListCmd
    name = self._pwd_ui_username(old.loginuid, 24)
  File "/usr/lib/python2.7/site-packages/dnf/cli/output.py", line 1196, in _pwd_ui_username
    fullname = _safe_split_0(ucd(user.pw_gecos), ';', 2)
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 130, in ucd
    return unicode(str(obj), _guess_encoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Local variables in innermost frame:
obj: 'V\xc3\xadt Ondruch'

Comment 1 Vít Ondruch 2014-10-23 04:52:42 UTC
Created attachment 949636 [details]
File: backtrace

Comment 2 Vít Ondruch 2014-10-23 04:52:44 UTC
Created attachment 949637 [details]
File: environ

Comment 3 Vít Ondruch 2014-10-23 04:59:50 UTC
This might by due to my name, which contains diacritics. I discovered this issue due to bug #1155878 and the "history" works, but the "history all", which displays my full name does not.

Comment 4 Honza Silhan 2014-10-31 10:50:37 UTC
Thanks for the report, right, it should print nicer error when someone tries to trick dnf with "LANG=C" and there's diacritics inside. The other option would be to continue as usual and replace these words with "<wrongly encoded word>" string or so.

Comment 5 Vít Ondruch 2014-10-31 11:03:04 UTC
(In reply to Jan Silhan from comment #4)
> and replace these words with "<wrongly encoded
> word>" string or so.

This is too big hammer IMO. I'm pretty sure there is some "standard" how to handle these cases, i.e. replace the character with '?' or simply "force encoding" which would display at least something partially useful.

Comment 6 Honza Silhan 2014-12-09 16:06:10 UTC
*** Bug 1152732 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2015-02-16 00:03:09 UTC
dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21

Comment 8 Fedora Update System 2015-02-17 08:04:04 UTC
Package hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hawkey-0.5.3-2.fc21 dnf-plugins-core-0.1.5-1.fc21 dnf-0.6.4-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-2139/dnf-plugins-core-0.1.5-1.fc21,hawkey-0.5.3-2.fc21,dnf-0.6.4-1.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-02-20 08:32:21 UTC
hawkey-0.5.3-2.fc21, dnf-plugins-core-0.1.5-1.fc21, dnf-0.6.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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