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

Autocompletion error for python while using CoC - VIM #1555

Closed
surmish opened this issue Apr 19, 2020 · 3 comments
Closed

Autocompletion error for python while using CoC - VIM #1555

surmish opened this issue Apr 19, 2020 · 3 comments

Comments

@surmish
Copy link

surmish commented Apr 19, 2020

Why does this keep showing up? I have jedi and python installed. I saw a similar issue but the submitter closed it without posting the resolution.

[coc.nvim] Jedi error: Traceback (most recent call last):
  File "completion.py", line 624, in watch
    response = self._process_request(rq)
  File "completion.py", line 574, in _process_request
    sys_path=sys.path, environment=self.environment)
  File "/home/ubuntu/.local/lib/python3.7/site-packages/jedi/api/__init__.py", line 133, in __init__
    project._sys_path = sys_path
AttributeError: 'NoneType' object has no attribute '_sys_path'

The line 133 in init.py mentioned above has the following code with a TODO:

# TODO deprecate and remove sys_path from the Script API.
if sys_path is not None:
  project._sys_path = sys_path                                                                                              
  warnings.warn(
    "Deprecated since version 0.17.0. Use the project API instead, "
    "which means Script(project=Project(dir, sys_path=sys_path)) instead.",
    DeprecationWarning,
    stacklevel=2
  )

Is the TODO relevant to the error I'm seeing? It seems so because project._sys_path seems to be NoneType and due to this looking for the attribute ._sys_path results in an error. Can you please look into this?

@davidhalter
Copy link
Owner

davidhalter commented Apr 19, 2020

What is CoC? This was fixed in #1548.

@surmish
Copy link
Author

surmish commented Apr 20, 2020

Thank you David. I should probably pull in these changes. By CoC (Conquer of Completion), I meant this: https://github.com/neoclide/coc.nvim

@davidhalter
Copy link
Owner

There's just too many different VIM plugins that offer code completion with Jedi. :) This is like the 10th.

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