Dnf breaking with 'utf-8' codec error

asked 2017-03-02 09:41:50 -0600

Cosmofur gravatar image

Process of upgrading from 23 to 24 (on path to 25) and dnf seems to have broken. (So I'm in transit between these two when issue occurred)

I can still use it to search for packages and download them, but when it tries to install anything it give the following dump:

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.4/site-packages/dnf/cli/main.py", line 175, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 61, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 121, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 150, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 228, in do_transaction
    super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 607, in do_transaction
    self._run_transaction(cb=cb)
  File "/usr/lib/python3.4/site-packages/dnf/base.py", line 650, in _run_transaction
    rpmdbv = self.sack.rpmdb_version(self._yumdb)
  File "/usr/lib/python3.4/site-packages/dnf/sack.py", line 76, in rpmdb_version
    if 'checksum_type' in ydbi and 'checksum_data' in ydbi:
  File "/usr/lib/python3.4/site-packages/dnf/yum/rpmsack.py", line 325, in __contains__
    x = self.get(attr)
  File "/usr/lib/python3.4/site-packages/dnf/yum/rpmsack.py", line 352, in get
    res = self._read(attr)
  File "/usr/lib/python3.4/site-packages/dnf/yum/rpmsack.py", line 282, in _read
    value = fo.read()
  File "/usr/lib/python3.4/codecs.py", line 319, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 0: invalid continuation byte

I've tired repairing yum with rpm --reinstall commands on the following related files

yum-3.4.3-507.fc23.noarch.rpm
python-2.7.11-11.fc23.i686.rpm
python3-3.4.3-12.fc23.i686.rpm

Rpm seems to think they re-installed ok and rpm reports them as installed.

Also based on the possibility the issue is with locales I also reinstalled glibc-common via rpm.

Not sure what else to do to fix this.

edit retag flag offensive close merge delete