[New-bugs-announce] [issue26330] shutil.disk_usage() on Windows can't properly handle unicode

Giampaolo Rodola' report at bugs.python.org
Wed Feb 10 10:11:17 EST 2016


New submission from Giampaolo Rodola':

On Python 3.4, Windows 7:

>>> import shutil, os
>>> path = 'psuugxik1s0è'
>>> os.stat(path)
os.stat_result(st_mode=33206, st_ino=6755399441249628, st_dev=3158553679, st_nlink=1, st_uid=0, st_gid=0, st_size=27136, st_atime=1455
116789, st_mtime=1455116789, st_ctime=1455116789)
>>>
>>> shutil.disk_usage(path)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\python34\lib\shutil.py", line 989, in disk_usage
    total, free = nt._getdiskusage(path)
NotADirectoryError: [WinError 267] The directory name is invalid
>>>

----------
messages: 260017
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: shutil.disk_usage() on Windows can't properly handle unicode
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26330>
_______________________________________


More information about the New-bugs-announce mailing list