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 resolve method is not behaving as expected in python2.7 when called with a path that does not exist.
Expected behavior
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> Path('~/does_not_exist').resolve()
WindowsPath('~/does_not_exist')
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib2 import Path
>>> Path('~/does_not_exist').resolve()
WindowsPath('~/does_not_exist')
Actual behavior
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib2 import Path
>>> Path('~/does_not_exist').resolve()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 1343, in resolve
self.stat()
File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 1356, in stat
return self._accessor.stat(self)
File "C:\Projects\python\construct_org\construct\venv27\lib\site-packages\pathlib2\__init__.py", line 541, in wrapped
return strfunc(str(pathobj), *args)
WindowsError: [Error 3] The system cannot find the path specified: '~\\does_not_exist'
The text was updated successfully, but these errors were encountered:
Thanks for reporting. I'm trying to fix this in the feature/fix-resolve branch (see pull request #55) but I don't have a windows system. Could you give the branch a go and see if it indeed fixes the problem for you?
the resolve method is not behaving as expected in python2.7 when called with a path that does not exist.
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: