Closed ghost closed 6 years ago
Could you please run the command :messages
in you vim after the Error detected while processing function...
error happened and post the result here?
@maralla Thank you for your reply.
Messages maintainer: Bram Moolenaar <Bram@vim.org>
"a.py" 41L, 812C
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>70_import_python[2]..completor#utils#setup_python:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>70_import_python[2]..completor#utils#setup_python:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>70_import_python[2]..completor#utils#setup_python:
line 1:
ModuleNotFoundError: No module named 'completor'
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
NameError: name 'completor_api' is not defined
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
NameError: name 'res' is not defined
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
E858: Eval did not return a valid python object
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
NameError: name 'completor_api' is not defined
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
Traceback (most recent call last):
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
NameError: name 'res' is not defined
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
The above is the first screen, the same error messages are repeated till the end of :messages
.
Run this command in your terminal:
$ vim -c ":py import completor;print('ok')" -c "qall" -T dumb
and check whether ok
is shown.
Nope, it said ImportError: No module named completor
.
Because of my python version? I'm using python anaconda version, but I have pointed that python binary.
Run vim
and execute the command scriptnames
to check the existence of <plug path>/completor.vim/plugin/completor.vim
. If the plugin is missing, the installation of completor
is failed. If not ls
the content of <plug path>/completor.vim/pythonx
and post the result.
@maralla Thank you for your reply.
<plug-path>/completor.vim/plugin/completor.vim
exists.
I tried $ vim -c ":py import completor;print('ok')" -c "qall" -T dumb
again. It gave me 'ok'.
I listed the directories in <plug path>/completor.vim/pythonx
. It gave me two directories, completers
and completor
.
However, I still get the following error when i edit a python file;
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>71_import_python[2]..completor#utils#setup_python:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>71_import_python[2]..completor#utils#setup_python:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>71_import_python[2]..completor#utils#setup_python:
line 1:
ModuleNotFoundError: No module named 'completor'
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
The error is saying completor
module not found and completor_api
is not defined. I think somehow the installation is not successful with vim-plug. Is the completor module going to be installed in the python path? Or it's not okay with the other plugins I have installed. I have no idea. Please have a look when you have a little spare time. At the same time, I'm going to experiment your pack and see it works with pack installation. Thank you very much for your time.
P.S: I'm on Solus GNU/Linux. I'm not sure it is the reason.
Could you please disable (comment out) all plugins except completor to see whether the problem still exists?
Yes, the problem still exists although I have disabled all plugins. I want to try pack
, it looks cool and clean. I'll get back to you. Just for the reference, from :messages
,
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>32_import_python[2]..completor#utils#setup_python:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>32_import_python[2]..completor#utils#setup_python:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[1]..<SNR>32_import_python[2]..completor#utils#setup_python:
line 1:
ModuleNotFoundError: No module named 'completor'
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 1:
NameError: name 'completor_api' is not defined
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
Traceback (most recent call last):
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
NameError: name 'res' is not defined
Error detected while processing function <lambda>1[1]..completor#do[7]..completor#utils#get_completer:
line 2:
E858: Eval did not return a valid python object
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
Traceback (most recent call last):
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 1:
NameError: name 'completor_api' is not defined
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
Traceback (most recent call last):
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
File "<string>", line 1, in <module>
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
line 2:
NameError: name 'res' is not defined
Error detected while processing function <lambda>2[1]..completor#do[7]..completor#utils#get_completer:
@maralla Hi Wei Zhang, I found the problem. It is because of python anaconda distribution
. I removed anaconda. Now completor
is working like charm. By the way, I like pack
too. Thank you for that. My vimrc
will be a lot cleaner. Let me close the issue.
I installed completor.vim with
vim-plug
as follows:But the following error occured while editing python files.![screenshot from 2018-05-20 18 19 07](https://user-images.githubusercontent.com/30887132/40277935-68b260de-5c5a-11e8-815c-97eaa78cf0f7.png)
I checked the log.
I have searched online, didn't find a solution. Any help is appreciated.