2

I am taking errors whenever open python code and then press a movement key. Just only have these error in .py extensions. Even not in the pyc

 Error detected while processing CursorMoved Autocommands for "<buffer=1>"..script /usr/share/vim/vimfiles/autoload/pymode/lint.vim:
line    1:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing CursorMoved Autocommands for "<buffer=1>"..script /usr/share/vim/vimfiles/autoload/pymode/lint.vim:
line    1:
  File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing CursorMoved Autocommands for "<buffer=1>"..script /usr/share/vim/vimfiles/autoload/pymode/lint.vim:
line    1:
  File "/usr/share/vim/vimfiles/pymode/lint.py", line 9, in <module>
Press ENTER or type command to continue
Error detected while processing CursorMoved Autocommands for "<buffer=1>"..script /usr/share/vim/vimfiles/autoload/pymode/lint.vim:
line    1:
    from pylama.lint.extensions import LINTERS
Press ENTER or type command to continue
Error detected while processing CursorMoved Autocommands for "<buffer=1>"..script /usr/share/vim/vimfiles/autoload/pymode/lint.vim:
line    1:
ModuleNotFoundError: No module named 'pylama'
Press ENTER or type command to continue

I'm able to fix this error partially with adding pymode plug-in. No longer vim doesn't give errors.

Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }

However whenever press J or any movement key first time then it is freezing a moment(maybe a second).

I think my solution is't good enough? Is there any reliable solution?

My plugins

Plug 'prabirshrestha/vim-lsp'
Plug 'gruvbox-community/gruvbox'
Plug 'jremmen/vim-fugitive'
Plug 'tpope/vim-fugitive'
Plug 'leafgarland/typescript-vim'
Plug 'vim-utils/vim-man'
Plug 'lyuts/vim-rtags'
Plug 'kien/ctrlp.vim'
"Plug 'Valloric/YouCompleteMe'
Plug 'mbbill/undotree'
Plug 'VundleVim/Vundle.vim'
Plug 'vim-airline/vim-airline'
Plug 'webastien/vim-ctags'
Plug 'neoclide/coc.nvim',{'branch':'release'}
Plug 'vim-syntastic/syntastic'
Plug 'nvie/vim-flake8'
Plug 'python-mode/python-mode', { 'for': 'python', 'branch': 'develop' }
2
  • 1
    I suppose you have two problems of different kinds. The first seems to be that the initial version of python-mode installed your machine rely on pylama that is probably not available on your machine (at least for the interpreter used by the plugin). The second is probably that one of your plugin install a mapping that starts with J maybe could you figure out which one using the following command: :verbose map <S-j> May 29, 2022 at 16:26
  • 1
    @VivianDeSmedt You right, I've different problems. But couldn't detect precisely. I removed vim-lsp and coc then added YCM that got rid of these errors and freezing problem. I'll try more optimization.
    – maxemilian
    Jun 4, 2022 at 14:24

1 Answer 1

2

As stated on the official page of Python-mode,

From 2017-11-19 onwards python-mode uses submodules instead of hard coding 3rd party libraries into its codebase. Please issue the command: git submodule update --init --recursive inside your python-mode folder.

Then you can address this issue by cloning its submodules(like the following):

cd /Users/lernerzhang/.local/share/nvim/plugged/
mv python-mode python-mode_bp
git clone --recurse-submodules https://github.com/python-mode/python-mode.git

A better approach to solving the auto-completion problem is to utilize YouCompleteMe. One solution can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.