Bug 1467412 - dnf fails with UnicodeDecodeError: traceback
Summary: dnf fails with UnicodeDecodeError: traceback
Keywords:
Status: CLOSED DUPLICATE of bug 1397848
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Rohel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-03 17:39 UTC by Terje Røsten
Modified: 2017-07-11 06:13 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-11 06:13:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Terje Røsten 2017-07-03 17:39:25 UTC
Description of problem:

dnf stops with:

Totalt                                           10 MB/s | 611 MB     00:59
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
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.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 227, in do_transaction
    self.gpgsigcheck(install_pkgs)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 253, in gpgsigcheck
    result, errmsg = self._sig_check_pkg(po)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 1114, in _sig_check_pkg
    sigresult = dnf.rpm.miscutils.checkSig(ts, po.localPkg())
  File "/usr/lib/python3.6/site-packages/dnf/rpm/miscutils.py", line 50, in checkSig
    siginfo = hdr.sprintf(string)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 13: invalid start byte

Version-Release number of selected component (if applicable):

$ rpm -q dnf rpm
dnf-2.5.1-1.fc26.noarch
rpm-4.13.0.1-4.fc26.x86_64


How reproducible:

Might be related to non utf-8 locale:

$ locale
LANG=nb_NO.iso88591
LC_CTYPE="nb_NO.iso88591"
LC_NUMERIC="nb_NO.iso88591"
LC_TIME="nb_NO.iso88591"
LC_COLLATE="nb_NO.iso88591"
LC_MONETARY="nb_NO.iso88591"
LC_MESSAGES="nb_NO.iso88591"
LC_PAPER="nb_NO.iso88591"
LC_NAME="nb_NO.iso88591"
LC_ADDRESS="nb_NO.iso88591"
LC_TELEPHONE="nb_NO.iso88591"
LC_MEASUREMENT="nb_NO.iso88591"
LC_IDENTIFICATION="nb_NO.iso88591"
LC_ALL=


Steps to Reproduce:
1. set locale as above
2. run dnf update

Comment 1 Jaroslav Rohel 2017-07-11 06:13:42 UTC
Was reported there: https://bugzilla.redhat.com/show_bug.cgi?id=1397848#c32

PR: https://github.com/rpm-software-management/dnf/pull/853

More info: https://bugzilla.redhat.com/show_bug.cgi?id=1397848#c35

I recommend using UTF-8 (except some special cases. Eg. small embeded systems).

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


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