luan / vimfiles

The Vim Configuration. Uses vim-plug to manage plugins.
172 stars 58 forks source link

nvim-completion-manager core channel terminated #124

Closed BooleanCat closed 6 years ago

BooleanCat commented 6 years ago

This issue has been talked about on Pivotal's internal slack, writing it up here for visibility for all.

What happened

I open vim and I see:

"~/workspace/bam-workstation/.git/COMMIT_EDITMSG" 66L, 1847C
Error detected while processing function <SNR>266_on_core_channel_error:
line    1:
Traceback (most recent call last):^@  File "/Users/pivotal/.vim/plugged/nvim-completion-manager/pythonx/cm_start.py", line 10
, in <module>^@    from cm import getLogger, start_and_run_channel^@  File "/Users/pivotal/workspace/vimfiles/plugged/nvim-completion-manager/pythonx/cm.py", line 151^@    self.nvim.call('cm#complete', name, ctx, startcol, matches, refresh, async=True)^@                                                                             ^^@SyntaxError: invalid syntax
Error detected while processing function <SNR>266_on_core_channel_error:
line    1:
nvim-completion-manager core channel terminated.

Why

You upgraded Python 3.7. Since Python 3.7, async is a keyword. This means that nvim-completion-manager now has syntax errors.

Resolution

?

luan is working on something

Workaround

I've worked around this for the time being by fixing the syntax errors:

sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm.py
sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm_core.py

You could also drop your python version to 3.6

coresh commented 5 years ago

Fix for:

Dark powered Vim/Neovim plugin manager :

sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/.cache/init.vim/.dein/pythonx/cm_core.py;
sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/.cache/.vimrc/.dein/pythonx/cm_core.py;
sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/repos/github.com/roxma/nvim-completion-manager/pythonx/cm_core.py;
sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/.cache/init.vim/.dein/pythonx/cm.py;
sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/.cache/.vimrc/.dein/pythonx/cm.py;
sed -i.bu 's/async=True/**{"async": True}/' ~/.cache/dein/repos/github.com/roxma/nvim-completion-manager/pythonx/cm.py;
hlmtre commented 4 years ago

I've worked around this for the time being by fixing the syntax errors:

sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm.py
sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm_core.py

You could also drop your python version to 3.6

For neovim users: those sed lines are:

sed -i.bu 's/async=True/**{"async": True}/' ~/.config/nvim/plugged/nvim-completion-manager/pythonx/cm.py
sed -i.bu 's/async=True/**{"async": True}/' ~/.config/nvim/plugged/nvim-completion-manager/pythonx/cm_core.py
Daniel-Monroy commented 4 years ago

He solucionado esto por el momento solucionando los errores de sintaxis:

sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm.py
sed -i.bu 's/async=True/**{"async": True}/' ~/.vim/plugged/nvim-completion-manager/pythonx/cm_core.py

También puedes bajar tu versión de Python a 3.6

Para usuarios de neovim: esas sedlíneas son:

sed -i.bu 's/async=True/**{"async": True}/' ~/.config/nvim/plugged/nvim-completion-manager/pythonx/cm.py
sed -i.bu 's/async=True/**{"async": True}/' ~/.config/nvim/plugged/nvim-completion-manager/pythonx/cm_core.py

Works in Ubuntu 20.04 !!! Thanks

ghost commented 3 years ago

Works! Thanks you!