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'
Created attachment 949636 [details] File: backtrace
Created attachment 949637 [details] File: environ
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.
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.
(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.
*** Bug 1152732 has been marked as a duplicate of this bug. ***
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
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).
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.