Investigating this a bit further, /usr/share/python3/debpython/files.py is calling "dpkg -L <package>" and when that fails to decode as UTF-8 we get the error.
I tried that for cloud-init and this in stdout for "dpkg -L cloud-init": /etc/systemd/system/sshd-keygen@.service.d/disable-sshd-keygen-if-cloud-init-active.conf /lib détourné par base-files vers : /lib.usr-is-merged /lib/systemd /lib/systemd/system So it seems that the issue only occurs if it lists a diversion (such as the base-files usrmerge diversion) in the output and that is being translated out of ASCII 7-bit. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2075337 Title: py3clean fails when using alternate character set To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2075337/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs