Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disk_usage() on windows + python 3 should be able to accept bytes #1051

Closed
giampaolo opened this issue May 3, 2017 · 0 comments
Closed

disk_usage() on windows + python 3 should be able to accept bytes #1051

giampaolo opened this issue May 3, 2017 · 0 comments

Comments

@giampaolo
Copy link
Owner

giampaolo commented May 3, 2017

>>> import psutil
>>> psutil.disk_usage('.')
sdiskusage(total=42423283712, used=31134781440, free=11288502272, percent=73.4)
>>> psutil.disk_usage(b'.')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\user\Desktop\psutil\psutil\__init__.py", line 2020, in disk_usage
    return _psplatform.disk_usage(path)
  File "C:\Users\user\Desktop\psutil\psutil\_pswindows.py", line 247, in disk_usage
    total, free = cext.disk_usage(path)
TypeError: argument 1 must be str, not bytes
>>>

All os.* and fs-related functions on Python 3 are able to so also should psutil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant