Note, filesystem/path encodings in Python can differ greatly on Windows from the utf-8 standard used on Linux and Macs.
So if you are trying to convert a bytestring in Python that contains a path or partial path to full unicode you should probably decode it using sys.getfilesystemencoding() to create a full unicode string and then encode that into utf-8 for printing.
Alternatively, you can use 'replace' with decode and encode routines to prevent problems with unknown bytestrings.
See my unipath.py code here for routines for fighting this battle:
https://github.com/Sigil-Ebook/Sigil...hon/unipath.py