You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pathlib works with oschmod on OSX and Linux pathlib.Path, but on Windows, we get TypeError: Objects of type 'WindowsPath' can not be converted to Unicode.
Your configuration
Windows 8.1, Python 3.9.6
Steps to reproduce
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import oschmod
>>> import pathlib
>>> p = pathlib.Path('E:/Projects/test.txt')
>>> oschmod.get_mode(p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\Projects\oschmod_venv\lib\site-packages\oschmod\__init__.py", line 163, in get_mode
return win_get_permissions(path)
File "E:\Projects\oschmod_venv\lib\site-packages\oschmod\__init__.py", line 364, in win_get_permissions
return _win_get_permissions(path, get_object_type(path))
File "E:\Projects\oschmod_venv\lib\site-packages\oschmod\__init__.py", line 376, in _win_get_permissions
sec_des = win32security.GetNamedSecurityInfo(
TypeError: Objects of type 'WindowsPath' can not be converted to Unicode.
>>> oschmod.get_mode('E:/Projects/test.txt')
7
Expected behavior
pathlib.Path works with oschmod operations
What happened instead
pathlib.Path with oschmod operations fails with TypeError
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
zapplecat
added a commit
to zapplecat/oschmod
that referenced
this issue
Aug 22, 2021
Describe the bug
The pathlib works with oschmod on OSX and Linux pathlib.Path, but on Windows, we get
TypeError: Objects of type 'WindowsPath' can not be converted to Unicode.
Your configuration
Windows 8.1, Python 3.9.6
Steps to reproduce
Expected behavior
pathlib.Path works with oschmod operations
What happened instead
pathlib.Path with oschmod operations fails with TypeError
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: