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
On older versions of Neovim, the following exception is raised (and uncaught). This is happening due to the expand("<sfile>:p:h") returning a path other than the plugin base directory. As a result of the wrong path being returned, the function call to incpy#SetupPythonLoader which follows will search the wrong path for the "python" directory and not find it.
Error detected while processing function incpy#LoadPlugin[5]..incpy#SetupPythonLoader:
line 10:
E605: Exception not caught: Unable to determine basepath from script
The logic that triggers this is literally <sfile>->incpy#LoadPlugin->incpy#SetupPythonLoader(..., expand("<sfile>:p:h")). If you execute expand("<sfile>:p:h") from the scope of the script, it returns the correct value... but if you do it from inside the incpy#LoadPlugin function, it returns a completely different value. So somehow during the change in scope from calling a function, Neovim botches up its expansion of <sfile>.
This manifests itself on Ubuntu 22.04 where the Neovim version is:
I looked around in the ticket tracker at https://github.com/neovim/neovim to see if there was a related issue that I could reference, but was unable to find one. This will probably require a bisect to figure out which version (and commits) are affected by this.
The text was updated successfully, but these errors were encountered:
Apparently commit neovim/neovim@98ab0bb is responsible for fixing this bug. That commit is based on vim/vim@a5d0423 which was merged back in 2020.
I'm unsure if the issue actually exists in vim or not as the line in question was written back in 2014, and I'm unable to compile that version of vim for some reason.
On older versions of Neovim, the following exception is raised (and uncaught). This is happening due to the
expand("<sfile>:p:h")
returning a path other than the plugin base directory. As a result of the wrong path being returned, the function call toincpy#SetupPythonLoader
which follows will search the wrong path for the "python" directory and not find it.The logic that triggers this is literally
<sfile>
->incpy#LoadPlugin
->incpy#SetupPythonLoader(..., expand("<sfile>:p:h"))
. If you executeexpand("<sfile>:p:h")
from the scope of the script, it returns the correct value... but if you do it from inside theincpy#LoadPlugin
function, it returns a completely different value. So somehow during the change in scope from calling a function, Neovim botches up its expansion of<sfile>
.This manifests itself on Ubuntu 22.04 where the Neovim version is:
For the record, the most current version of Neovim (where this issue doesn't exist) is:
I looked around in the ticket tracker at https://github.com/neovim/neovim to see if there was a related issue that I could reference, but was unable to find one. This will probably require a bisect to figure out which version (and commits) are affected by this.
The text was updated successfully, but these errors were encountered: