Bug 1241224 - [abrt] dnf: ascii.py:26:decode:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 32: ordinal not in range(128)
Summary: [abrt] dnf: ascii.py:26:decode:UnicodeDecodeError: 'ascii' codec can't decode...
Keywords:
Status: CLOSED DUPLICATE of bug 1329877
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmconf
Version: 22
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:07bd9d592447a064ab5e7ff8480...
: 1262089 1283761 1319286 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 18:49 UTC by Jiří Martínek
Modified: 2016-06-24 06:59 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-24 06:59:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.35 KB, text/plain)
2015-07-08 18:49 UTC, Jiří Martínek
no flags Details
File: environ (3.43 KB, text/plain)
2015-07-08 18:49 UTC, Jiří Martínek
no flags Details

Description Jiří Martínek 2015-07-08 18:49:53 UTC
Version-Release number of selected component:
dnf-1.0.1-2.fc22

Additional info:
reporter:       libreport-2.6.0
cmdline:        /usr/bin/python3 -OO /bin/dnf upgrade
executable:     /bin/dnf
kernel:         4.1.0-1.fc23.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
ascii.py:26:decode:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 32: ordinal not in range(128)

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 185, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 170, in resolving
    base.plugins.run_transaction()
  File "/usr/lib/python3.4/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python3.4/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python3.4/site-packages/dnf-plugins/rpm_conf.py", line 47, in transaction
    rconf.run()
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 88, in run
    self._handle_package(pkg_hdr)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 253, in _handle_package
    tmp.format(conf_file, "rpmnew"))
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 279, in _handle_rpmnew
    self._ls_conf_file(conf_file, other_file)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 201, in _ls_conf_file
    universal_newlines=True))
  File "/usr/lib64/python3.4/subprocess.py", line 609, in check_output
    output, unused_err = process.communicate(inputdata, timeout=timeout)
  File "/usr/lib64/python3.4/subprocess.py", line 946, in communicate
    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib64/python3.4/subprocess.py", line 491, in _eintr_retry_call
    return func(*args)
  File "/usr/lib64/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 32: ordinal not in range(128)

Local variables in innermost frame:
input: b'-rw-r--r--. 1 root root 2956 16.\xc2\xa0dub 01.15 /etc/cups/cups-browsed.conf\n-rw-r--r--. 1 root root 3559 22.\xc2\xa0\xc4\x8den 15.17 /etc/cups/cups-browsed.conf.rpmnew\n'
self: <encodings.ascii.IncrementalDecoder object at 0x7f5a9eb238d0>
final: True

Comment 1 Jiří Martínek 2015-07-08 18:49:56 UTC
Created attachment 1049968 [details]
File: backtrace

Comment 2 Jiří Martínek 2015-07-08 18:49:58 UTC
Created attachment 1049969 [details]
File: environ

Comment 3 Radek Holy 2015-07-09 10:35:53 UTC
Looks like a problem in rpmconf or in the DNF's rpmconf community plugin.

Comment 4 Miroslav Suchý 2015-11-09 14:05:45 UTC
*** Bug 1262089 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Suchý 2015-11-22 14:45:02 UTC
I cannot reproduce it directly using rpmconf.
$ LANG=cs_CZ.UTF-8 rpmconf -a
Most features are not useful without root privileges!!!
Configuration file '/etc/nsswitch.conf'
-rw-r--r-- 1 root root 1702 17. zář 17.21 /etc/nsswitch.conf.rpmnew
-rw-r--r-- 1 root root 1774 23. říj 20.45 /etc/nsswitch.conf

Comment 6 Miroslav Suchý 2015-11-22 14:51:44 UTC
Hmm and I cannot reproduce it neither with
  python3-dnf-plugins-extras-rpmconf
installed and:
  # LANG=cs_CZ.UTF-8 dnf install python3-dnf-plugins-core
Last metadata expiration check performed 1:48:54 ago on Sun Nov 22 13:59:58 2015.
Balíček python3-dnf-plugins-core-0.1.13-1.fc23.noarch už je nainstalován, přeskakuji.
Závislosti vyřešeny.
=====================================================================================================================================================================
 Balíček                                            Arch                             Verze                                   Repozitář                          Vel.
=====================================================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 dnf                                                noarch                           1.1.4-1.fc23                            updates                           265 k
 dnf-conf                                           noarch                           1.1.4-1.fc23                            updates                            89 k
 dnf-plugins-core                                   noarch                           0.1.14-1.fc23                           updates                            36 k
 dnf-yum                                            noarch                           1.1.4-1.fc23                            updates                            82 k
 python2-dnf                                        noarch                           1.1.4-1.fc23                            updates                           447 k
 python3-dnf                                        noarch                           1.1.4-1.fc23                            updates                           452 k
 python3-dnf-plugins-core                           noarch                           0.1.14-1.fc23                           updates                            64 k

Shrnutí transakce
=====================================================================================================================================================================

Není co dělat
Configuration file '/etc/nsswitch.conf'
-rw-r--r-- 1 root root 1702 17. zář 17.21 /etc/nsswitch.conf.rpmnew
-rw-r--r-- 1 root root 1774 23. říj 20.45 /etc/nsswitch.conf

Can you give me some hints how to reproduce it?
Because looking at the code I see no obvious error.

Comment 7 Jiří Martínek 2015-12-07 13:16:30 UTC
Sorry, I can't reproduce it either, I don't use this version of DNF anymore... :-(

Comment 8 Miroslav Suchý 2015-12-22 00:12:32 UTC
*** Bug 1283761 has been marked as a duplicate of this bug. ***

Comment 9 Honza Silhan 2016-03-29 14:11:07 UTC
*** Bug 1319286 has been marked as a duplicate of this bug. ***

Comment 10 Prokhorov Max 2016-06-23 23:30:04 UTC
Turns out dnf sets locale to C and does not restore it to the old one when packages are gpg-checked(dnf-1.1.9/dnf/cli/cli.py:220 gpgsigcheck)

This should be fixed by dnf in https://github.com/rpm-software-management/dnf/commit/93159e360f0b6150e598bba783e22ca113201a40

Comment 11 Miroslav Suchý 2016-06-24 06:59:40 UTC

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


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