Bug 1323453 - [abrt] dnf: locale.py:111:localeconv:UnicodeDecodeError: 'locale' codec can't decode byte 0xc2 in position 0: Invalid or incomplete multibyte or wide character
Summary: [abrt] dnf: locale.py:111:localeconv:UnicodeDecodeError: 'locale' codec can't...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:e5adfdba7d0b0bd0839be275901...
: 1384479 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-03 08:30 UTC by srrosten
Modified: 2016-10-14 06:05 UTC (History)
11 users (show)

Fixed In Version: dnf-1.1.9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-01 11:01:21 UTC
Type: ---


Attachments (Terms of Use)
File: _var_log_dnf.log (164.23 KB, text/plain)
2016-04-03 08:30 UTC, srrosten
no flags Details
File: backtrace (1.52 KB, text/plain)
2016-04-03 08:30 UTC, srrosten
no flags Details
File: dnf-makecache.log (1.28 MB, text/plain)
2016-04-03 08:30 UTC, srrosten
no flags Details
File: environ (3.22 KB, text/plain)
2016-04-03 08:30 UTC, srrosten
no flags Details

Description srrosten 2016-04-03 08:30:24 UTC
Version-Release number of selected component:
dnf-1.1.6-2.fc23

Additional info:
reporter:       libreport-2.6.4
cmdline:        /usr/bin/python3 /usr/bin/dnf repolist
executable:     /usr/bin/dnf
kernel:         4.4.4-301.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
locale.py:111:localeconv:UnicodeDecodeError: 'locale' codec can't decode byte 0xc2 in position 0: Invalid or incomplete multibyte or wide character

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/repolist.py", line 132, in run
    ui_num = _num2ui_num(num)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/repolist.py", line 47, in _num2ui_num
    return ucd(dnf.pycomp.format("%d", num, True))
  File "/usr/lib64/python3.4/locale.py", line 195, in format
    return _format(percent, value, grouping, monetary, *additional)
  File "/usr/lib64/python3.4/locale.py", line 216, in _format
    formatted, seps = _group(formatted, monetary=monetary)
  File "/usr/lib64/python3.4/locale.py", line 140, in _group
    conv = localeconv()
  File "/usr/lib64/python3.4/locale.py", line 111, in localeconv
    d = _localeconv()
UnicodeDecodeError: 'locale' codec can't decode byte 0xc2 in position 0: Invalid or incomplete multibyte or wide character

Local variables in innermost frame:

Comment 1 srrosten 2016-04-03 08:30:31 UTC
Created attachment 1142946 [details]
File: _var_log_dnf.log

Comment 2 srrosten 2016-04-03 08:30:32 UTC
Created attachment 1142947 [details]
File: backtrace

Comment 3 srrosten 2016-04-03 08:30:39 UTC
Created attachment 1142948 [details]
File: dnf-makecache.log

Comment 4 srrosten 2016-04-03 08:30:40 UTC
Created attachment 1142949 [details]
File: environ

Comment 5 Honza Silhan 2016-04-04 11:46:38 UTC
Thanks for the report.

Comment 6 René Genz 2016-06-06 21:12:03 UTC
I encounter something similar in F24 with:
$ rpm -q dnf
dnf-1.1.9-2.fc24.noarch


output in terminal is:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 60, in main 
    return _main(base, args)
  File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 112, in _main
    cli.run()
  File "/usr/lib/python3.5/site-packages/dnf/cli/cli.py", line 1096, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.5/site-packages/dnf/cli/commands/repolist.py", line 132, in run
    ui_num = _num2ui_num(num)
  File "/usr/lib/python3.5/site-packages/dnf/cli/commands/repolist.py", line 47, in _num2ui_num
    return ucd(dnf.pycomp.format("%d", num, True))
  File "/usr/lib64/python3.5/locale.py", line 195, in format
    return _format(percent, value, grouping, monetary, *additional)
  File "/usr/lib64/python3.5/locale.py", line 216, in _format 
    formatted, seps = _group(formatted, monetary=monetary)
  File "/usr/lib64/python3.5/locale.py", line 140, in _group
    conv = localeconv()
  File "/usr/lib64/python3.5/locale.py", line 111, in localeconv
    d = _localeconv()
UnicodeDecodeError: 'locale' codec can't decode byte 0xe2 in position 0: Invalid or incomplete multibyte or wide character


steps to reproduce:
1. install Fedora 24 with 'Minimal Install' group
2. $ dnf install -y langpacks-de
3. $ reboot
4. $ dnf repolist # no error
5. $ LANG="C" LC_MONETARY="de_DE.UTF-8" dnf repolist # error


Additional info:
locale variables that seem to trigger the message are only:
LANG
LC_CTYPE
LC_MONETARY


complete locale I started out with:
LANG=C LC_CTYPE="C" LC_NUMERIC=de_DE.UTF-8 LC_TIME=de_DE.UTF-8 LC_COLLATE="C" LC_MONETARY=de_DE.UTF-8 LC_MESSAGES="C" LC_PAPER=de_DE.UTF-8 LC_NAME=de_DE.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=de_DE.UTF-8 dnf repolist

Comment 7 Peter Schwindt 2016-06-21 09:23:38 UTC
Have you tried using dnf-2 instead of dnf? This seems to still work on my system.

Comment 8 René Genz 2016-06-22 22:06:42 UTC
for F24 x86_64:
$ sudo dnf install -y python2-dnf
$ LANG="C" LC_MONETARY="de_DE.UTF-8" dnf repolist # error
$ LANG="C" LC_MONETARY="de_DE.UTF-8" dnf-2 repolist # no error

Comment 9 Fedora Admin XMLRPC Client 2016-07-08 09:37:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Štěpán Smetana 2016-08-01 11:01:21 UTC
Works for me.
Should be fixed in dnf-1.1.9 (Take a look at this commit https://github.com/rpm-software-management/dnf/commit/93159e360f0b6150e598bba783e22ca113201a40)
In case reopen this bug and provide more info.
Thanks

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

Comment 11 René Genz 2016-08-01 17:56:49 UTC
The problem I describe in comment #6 and #8 is still present.

I cannot reopen this bug.
Shall I open a new bug?

Comment 12 Štěpán Smetana 2016-08-01 19:33:21 UTC
Sorry for mislead. This bug should be fixed by commit mentioned above, but it is in next release. U can try it by enabling dnf nightly repository.

Comment 13 Štěpán Smetana 2016-08-01 19:34:01 UTC
Sorry for mislead. This bug should be fixed by commit mentioned above, but it is in next release. U can try it by enabling dnf nightly repository.

Comment 14 Igor Gnatenko 2016-10-14 06:05:03 UTC
Btw, it has been fixed in rawhide.

Comment 15 Igor Gnatenko 2016-10-14 06:05:18 UTC
*** Bug 1384479 has been marked as a duplicate of this bug. ***


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