[docs] [issue26330] shutil.disk_usage() on Windows can't properly handle unicode

Giampaolo Rodola' report at bugs.python.org
Wed Feb 10 10:41:49 EST 2016

Giampaolo Rodola' added the comment:

Different but kind of related, disk_usage() is not able to accept bytes:

>>> shutil.disk_usage(b'.')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\python34\lib\shutil.py", line 989, in disk
    total, free = nt._getdiskusage(path)
TypeError: must be str, not bytes


Python tracker <report at bugs.python.org>

More information about the docs mailing list