Closed Konstantin-Glukhov closed 3 years ago
There's a relpath
helper that could/should be used here maybe: https://github.com/davidhalter/jedi-vim/blob/5d4615707fc7bce8a4f1fdaa5f7f07c11637bc30/pythonx/jedi_vim.py#L456-L461
@Konstantin-Glukhov Please consider patching it using that helper, testing it, and creating a PR then.
Fixed in #1045
Issue
On Windows with Python 3.9 if vim jedi is installed on different drive than Python itself, 'goto' function causes the exception _"path is on mount %r, start on mount %r"_thrown by os.path.relpath(path) on line 1115 in file pythonx/jedi_vim.py. This issue can be easily fixed by changing relpath() call to realpath().
Steps to reproduce
Install Python 3.9 to P:\Python\39 Install gvim8.2 (compiled with python 3.9) to P:\Vim Install vim jedi on drive E:\Vim\vimfiles\pack\misc\opt\jedi
set VIM=E:\Vim set VIMRUNTIME=P:\Vim\vim82
create E:\Vim\vimrc packadd jedi
open a python script with any call to some standard python library function and trigger 'goto' exception will be thrown as described in the issue