I've been able to reproduce this bug consistently. It appears python3-apt is at cause. If a non-utf8 locale is configured, apt will returned descriptions in the preferred lang/encoding and python3 fails to interpret them as utf8. Python2.7 did ascii conversion, returning "lossy" unicode conversion but not crashing.
$ grep en_US /etc/locale.gen en_US ISO-8859-1 # en_US.ISO-8859-15 ISO-8859-15 # en_US.UTF-8 UTF-8 $ LANG=en_US python3 Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import apt >>> apt.Cache().get("gosa").versions[0].description Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3/dist-packages/apt/package.py", line 627, in description dsc = records.long_desc if records is not None else None UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 236: invalid start byte ** Also affects: python-apt (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1827857 Title: Stuck on applying package profile for servers running 18.04 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/landscape-client/+bug/1827857/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs