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

Intellisense hangs with Loading... #423

Closed
Joshua-Chin opened this issue Dec 14, 2017 · 13 comments
Closed

Intellisense hangs with Loading... #423

Joshua-Chin opened this issue Dec 14, 2017 · 13 comments
Assignees
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug macos

Comments

@Joshua-Chin
Copy link

Environment data

VS Code version: 1.19.0
Python Extension version: 0.9.0
Python Version: 3.6.3
OS and version: MacOS 10.13.2

Actual behavior

Intellisense hangs indefintely with Loading... when hovering over a function.

Expected behavior

Intellisense provides documentation about the function.

Steps to reproduce:

  • Hover over a function

Output from Console window (Help->Developer Tools menu)

Python Extension: error jediProxy, Error (error) Error: spawn python3 ENOENT null

Additional Information

I just updated to 0.9.0 and Intellisense stopped workings.

It seems that the extension cannot find python3 on my path. I installed python3 using homebrew in /usr/local/. I prepend /usr/local/ to my PATH in .profile and .zprofile. I also activate my default python3 virtualenv in my .zshrc.

Running python3 programs works in the vscode integrated terminal. This bug occurs regardless of whether I launch vscode from either the terminal or the application folder. This bug may be related to saravanan-k90/python-jedi#9.

Let me know if there's any way I can help!

@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 14, 2017
@Hobinx
Copy link

Hobinx commented Dec 15, 2017

Working fine until I upgraded to vscode 1.19.0, same problem occurred.

Update:

After explicitly set the python.pythonPath to the fully qualified path of my virtual env's python, the problem seems to be fixed.

@markobalogh
Copy link

markobalogh commented Dec 15, 2017

Same issue for me. Everything working until I updated...I downgraded my vs code to 1.18.1 to check if it was the VS code update but it still doesn't work in the previous VS code version---I have no python intellisense functionality, just hangs on "loading...".
VS code version: 1.18.1
Python extension 0.9.0
Python 3.6.0
Mac OS 10.13.2

Update:

For me, the problem was caused by the python.pythonPath variable in my VS code settings. Before, I had simply used python3 and this was ok. Now, after noticing the python debugger asking me to validate the python path, I changed it to a fully qualified path (pasting in the result of running $ which python3 in terminal), and that seems to have fixed both my debugger issues and the intellisense issues mentioned above.

@brettcannon
Copy link
Member

@Joshua-Chin could you check if all the paths listed on PATH are actually valid? We have run into problems with node not liking entries on PATH that don't actually exist.

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed awaiting 1-verification labels Dec 15, 2017
@Joshua-Chin
Copy link
Author

All paths listed on my PATH are valid. In addition, launching vscode from the terminal with

PATH=/usr/local/bin:/usr/bin:/bin code

still results in the bug.

@DonJayamanne
Copy link

DonJayamanne commented Dec 15, 2017

When you update PATH in the following manner PATH=/usr/local/bin:/usr/bin:/bin
Aren't you blitzing away existing path variables. Shouldn't you be appending or prepending as follows:
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin

Try the following (this has nothing to do with VS Code anymore):
PATH=/usr/local/bin:/usr/bin:/bin python3

@Joshua-Chin
Copy link
Author

Running the command yields:

➜ PATH=/usr/local/bin:/usr/bin:/bin python3
Python 3.6.3 (default, Oct  4 2017, 06:09:38) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Both python3 and code are located in /usr/local/bin:

➜ PATH=/usr/local/bin:/usr/bin:/bin which python3                                      
/usr/local/bin/python3
➜ PATH=/usr/local/bin:/usr/bin:/bin which code                                         
/usr/local/bin/code

P.S. Normally, you should append or prepend to PATH. In this case, I explicity overwrite PATH to firmly rule out the possibility of nonexistent paths.

@brettcannon brettcannon added awaiting 1-verification and removed info-needed Issue requires more information from poster labels Dec 15, 2017
@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster awaiting 1-verification and removed awaiting 1-verification info-needed Issue requires more information from poster labels Dec 16, 2017
@brian41005
Copy link

this is how I fixed this problem:
give pythonPath a full path
"python.pythonPath": "/usr/local/bin/python3"

@nikhilwason
Copy link

Worked for me too!

@MikhailArkhipov
Copy link

Looks like Mac specific, might be improved by #517

@brettcannon
Copy link
Member

@MikhailArkhipov so can we considered this verified and waiting a fix?

@MikhailArkhipov
Copy link

I believe yes. With the pending PR on MacOS there will be warning against using python as a path setting

@MikhailArkhipov
Copy link

Also #536

@MikhailArkhipov
Copy link

Most probably addressed by #536, next update in January.

@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 macos
Projects
None yet
Development

No branches or pull requests

8 participants