Serhiy Storchaka added the comment: > str(arg.path) if hasattr(arg, 'path') else arg DirEntry.path can be bytes. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue22570> _______________________________________