Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined variable: g:python3_host_prog #50

Closed
jacklenox opened this issue Aug 24, 2022 · 2 comments
Closed

Undefined variable: g:python3_host_prog #50

jacklenox opened this issue Aug 24, 2022 · 2 comments

Comments

@jacklenox
Copy link

I'm getting the following error when trying to run pathfinder on my installation of Neovim:

Error detected while processing function provider#python3#Call:                                                                                            
line   18:                                                                                                                                                 
Error invoking 'python_execute' on channel 4 (python3-script-host):                                                                                        
Traceback (most recent call last):                                                                                                                         
  File "<string>", line 1, in <module>                                                                                                                     
  File "/home/jack/.local/share/nvim/plugged/pathfinder.vim/pathfinder/client/plugin.py", line 15, in __init__                                             
    self.client = Client()                                                                                                                                 
  File "/home/jack/.local/share/nvim/plugged/pathfinder.vim/pathfinder/client/client.py", line 24, in __init__                                             
    self.open()                                                                                                                                            
  File "/home/jack/.local/share/nvim/plugged/pathfinder.vim/pathfinder/client/client.py", line 34, in open                                                 
    self._build_server_cmd(), stdout=subprocess.PIPE, stderr=subprocess.PIPE                                                                               
  File "/home/jack/.local/share/nvim/plugged/pathfinder.vim/pathfinder/client/client.py", line 58, in _build_server_cmd                                    
    python3_host_prog = vim.eval("g:python3_host_prog")                                                                                                    
  File "/home/jack/.local/lib/python3.9/site-packages/pynvim/plugin/script_host.py", line 205, in eval                                                     
    obj = self.request("vim_eval", expr)                                                                                                                   
  File "/home/jack/.local/lib/python3.9/site-packages/pynvim/api/nvim.py", line 182, in request                                                            
    res = self._session.request(name, *args, **kwargs)                                                                                                     
  File "/home/jack/.local/lib/python3.9/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request                                                 
    raise self.error_wrapper(err)                                                                                                                          
pynvim.api.common.NvimError: Vim:E121: Undefined variable: g:python3_host_prog

This is from my :checkhealth:

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /home/linuxbrew/.linuxbrew/bin/python3
  - INFO: Other python executable: /usr/bin/python3
  - INFO: Other python executable: /bin/python3
  - INFO: Python version: 3.9.13
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

And this is my version info:

NVIM v0.7.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/nvim/parts/nvim/build/build/config -I/build/nvim/parts/nvim/build/src -I/build/nvim/parts/nvim/build/.deps/usr/include -I/usr/include -I/build/nvim/parts/nvim/build/build/src/nvim/auto -I/build/nvim/parts/nvim/build/build/include
Compiled by root@lcy02-amd64-012

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
@danth danth closed this as completed in 4c01c96 Aug 24, 2022
@danth
Copy link
Owner

danth commented Aug 24, 2022

I've pushed a possible fix for this - could you try it again?

@jacklenox
Copy link
Author

@danth That's got it, thank you for the speedy fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants