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

Go to definition and autocompletion not work on some library #430

Closed
rdtr opened this issue Dec 15, 2017 · 9 comments
Closed

Go to definition and autocompletion not work on some library #430

rdtr opened this issue Dec 15, 2017 · 9 comments
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@rdtr
Copy link

rdtr commented Dec 15, 2017

Environment data

VS Code version: 1.19.0
Python Extension version: 0.9.0
Python Version: 2.7.4
OS and version: Mac OS X High Sierra

Actual behavior

untitled

For some import (in the example above, library Airflow) VSCode + Python can normally jump to its original source file (even the library is installed in virtualenv), and auto completion also works. But others (in the example above, library google-cloud-bigquery) I cannot use both of them. VSCode doesn't recognize the library while the code can successfully run.

Expected behavior

I can use auto completion,

Steps to reproduce:

  • Install google-cloud-bigquery in virtualenv
  • select the corresponding interpreter from command pallet
  • try using auto complete or go to definition related to the library

Logs

empty.

Do you have any idea what causes this issue..?
Thanks in advance.

@brettcannon brettcannon added awaiting 1-verification area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug labels Dec 15, 2017
@tomlaube
Copy link

Environment data
VS Code version: 1.19.0
Python Extension version: 0.9.0
Python Version: 3.6.3
OS and version: Mac OS X High Sierra

Getting the same problem after updating to 1.19 on some of projects.
Console includes:
[Extension Host] Python Extension: error jediProxy, Error (error) Error: spawn python3 ENOENT null

@DonJayamanne
Copy link

@tomlaube you're experiencing a different issue. Please could you create a separate issue for this.

@rdtr
Copy link
Author

rdtr commented Dec 18, 2017

https://donjayamanne.github.io/pythonVSCodeDocs/docs/autocomplete/
It might be the same issue as GoogleAppEngine so possibly not this extension's bug.

However I could not figure out then where the necessary extraPath I need to configure..

@DonJayamanne
Copy link

DonJayamanne commented Dec 18, 2017

Please note the official docs for Python can be found here and here

  • Please confirm google cloud package is installed in your python environment.
  • If it is please could you print the path to the python interpreter here?
  • Finally is the above environment your default python environment (which python)

@DonJayamanne
Copy link

Found something interesting, please check the following: googleapis/google-cloud-python#3686

@rdtr
Copy link
Author

rdtr commented Dec 18, 2017

Please confirm google cloud package is installed in your python environment

Yes it is. pip list shows google-cloud-bigquery in my virtualenv.

If it is please could you print the path to the python interpreter here?

/Users/username/.virtualenvs/airflow_dags/bin/python

Finally is the above environment your default python environment

which python shows
/Users/username/.virtualenvs/airflow_dags/bin/python
(it is natural because I already entered the venv before running this)

I think the issue you mentioned
googleapis/google-cloud-python#3686
is highly likely the culprit.

@rdtr
Copy link
Author

rdtr commented Dec 22, 2017

@DonJayamanne So might we want to have a ticket as an enhancement to support namespace package auto completion & go to definition, independent from this issue..?

@DonJayamanne
Copy link

So might we want to have a ticket as an enhancement to support namespace package auto completion & go to definition, independent from this issue..?

Yes, and please close this issue and then point back to this issue (in the new one).
Thanks

@brettcannon
Copy link
Member

Closing in favour of #231

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants