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

Error detected but minimap launches to some extent #79

Open
NdranC opened this issue May 2, 2020 · 2 comments
Open

Error detected but minimap launches to some extent #79

NdranC opened this issue May 2, 2020 · 2 comments

Comments

@NdranC
Copy link

NdranC commented May 2, 2020

I'm in Arch and I installed both "nvim" and "phyton-pynvim" packages.

When I launch the minimap I get this error:

Error detected while processing function minimap#ShowMinimap[4]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "", line 1, in
File "/home/ndranc/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 96, in showminimap
vim.command(":call minimap#UpdateMinimap()")
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 287, in command
return self.request('nvim_command', string, **kwargs)
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Vim(return):Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "", line 1, in
File "/home/ndranc/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 160, in updateminimap
vim.current.window = minimap
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 534, in window
return self._session.request('nvim_set_current_win', window)
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Failed to switch to window 1001
Press ENTER or type command to continue

The minimap proceeds to open but it looks like this:
image

Not sure if that is the way it's supposed to look but maybe I have to change the font since it doesn't seem to match the content very well. The minimap seems to "function" but I'm unable to toggle it or close it getting the following error when I try:

Error detected while processing function minimap#CloseMinimap[4]..provider#python3#Call:
line 18:
Error invoking 'python_execute' on channel 3 (python3-script-host):
Traceback (most recent call last):
File "", line 1, in
File "/home/ndranc/.config/nvim/plugged/vim-minimap/autoload/minimap.py", line 213, in closeminimap
vim.current.window = minimap
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 534, in window
return self._session.request('nvim_set_current_win', window)
File "/usr/lib/python3.8/site-packages/pynvim/api/nvim.py", line 182, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/pynvim/msgpack_rpc/session.py", line 102, in request
raise self.error_wrapper(err)
pynvim.api.common.NvimError: Failed to switch to window 1001
Press ENTER or type command to continue

EDIT: My :CheckHealth gives me this error:
image
Not sure if it's relevant to the plugin but I have both python3 (3.8) and python2 (2.7) installed and under $PATH.

@hp4k1h5
Copy link

hp4k1h5 commented May 6, 2020

im getting the same result. seems to be related to or duplicate of #42 . i would try following the instructions given in :help provider-python for python2 first. but there doesnt seem to be resolution to the 42 issue

@bechampion
Copy link

i did something horrid to avoid the message of error when u start:
sys.tracebacklimit = 0
and wrap the functions inside toggle with try except pass

    minimap = getmmwindow()
    if minimap:
        try:
            closeminimap()
        except:
            pass
    else:
        try:
            showminimap()
        except:
            pass

forgive me

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

3 participants