python-language-server
python-language-server copied to clipboard
path error caused by 'to_fs_path' method
question about this method https://github.com/palantir/python-language-server/blob/21833eafd4e254a79d35ca539967f3a010e8c2a1/pyls/uris.py#L46 in windows, if I pass a uri started with 'C:\' for example:
from pyls.uris import to_fs_path
uri = 'C:\\py_test\\test.py'
value = to_fs_path(uri)
print(value)
the result shows:
\py_test\test.py
thus, an error appeared when I call the completion api when passing this 'C:\' included uri:
-32602, "FileNotFoundError: [Errno 2] No such file or directory: '\\\\py_test\\\\test.py'"
this error happened in this line: https://github.com/palantir/python-language-server/blob/21833eafd4e254a79d35ca539967f3a010e8c2a1/pyls/workspace.py#L143 It tried to open '\py_test\test.py' rather than 'C:\py_test\test.py'