Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Horrible experience with Python Language Server #1813

Closed
awav opened this issue Nov 25, 2019 · 7 comments
Closed

Horrible experience with Python Language Server #1813

awav opened this issue Nov 25, 2019 · 7 comments
Labels
duplicate This issue or pull request already exists

Comments

@awav
Copy link

awav commented Nov 25, 2019

Hello everyone,

Lately, python language server is super laggy and buggy (+ https://github.com/microsoft/vscode-python/issues/8768)

  1. Often Language Server emits errors like below and my guess it depends on "weather conditions" - absolutely unpredictable.
Unable to open 'python.pyi': Unable to read file (Error: File not found (/Users/artemav/Library/Caches/Microsoft/Python Language Server/stubs.v4/fJB3UsE4Gq6YclHi4GoLw6ngBkMtdMTdkOlmPhNG7K8=/python.pyi)).
  1. I cannot get any reasonable autocompletion, even for standard python things! Sometimes, I see this error in "Developer Tools".
ERR No application in the Launch Services database matches the input criteria.: Error: No application in the Launch Services database matches the input criteria.
  1. At workspace some folders are indexed and others are not, but have similar code and use same dependencies...

PS: I have to switch to Pycharm! I'm ready to help with debugging the issue and I'm sorry not providing MWE how to reproduce it, because all logs are nearly empty:

[Info  - 9:23:53 PM] Analysis cache path: /Users/artemav/Library/Caches/Microsoft/Python Language Server
[Info  - 9:23:53 PM] Microsoft Python Language Server version 0.4.114.0
[Info  - 9:23:53 PM] Workspace root: /Users/artemav/code/bayesian-optimization
[Info  - 9:23:53 PM] GetCurrentSearchPaths /Users/artemav/anaconda3/envs/tf/bin/python 
[Info  - 9:23:53 PM] Interpreter search paths:
[Info  - 9:23:53 PM]     /Users/artemav/anaconda3/envs/tf/lib/python3.7
[Info  - 9:23:53 PM]     /Users/artemav/anaconda3/envs/tf/lib/python3.7/lib-dynload
[Info  - 9:23:53 PM]     /Users/artemav/.local/virtual-site-packages
[Info  - 9:23:53 PM]     /Users/artemav/anaconda3/envs/tf/lib/python3.7/site-packages
[Info  - 9:23:53 PM]     /Users/artemav/code/grand_prix
[Info  - 9:23:53 PM]     /Users/artemav/code/GPflow
[Info  - 9:23:53 PM] User search paths:
[Info  - 9:23:56 PM] Initializing for /Users/artemav/anaconda3/envs/tf/bin/python
[Info  - 9:23:58 PM] Analysis caching mode: None.

OS: macOS Mojave 10.14.6
Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:47:44.719Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Nov 25, 2019
@jakebailey
Copy link
Member

1 is a bug.

2 is two unrelated things. We'd like to know what autocomplete is not showing up that should. The language server cannot print to that debug window (that's VS Code).

3 I'm not sure what you mean by "indexed". Specifically autocompletion? Linting? Workspace symbol indexing?

We need something specific to work on here. Do you have the code that causes issues?

@awav
Copy link
Author

awav commented Nov 28, 2019

I cannot get any reasonable autocompletion, even for standard python things! Sometimes, I see this error in "Developer Tools".

My guess, I'm experiencing the same issue as here: #1806. The analyzing hangs and, in the end, the autocompletion stops working.

3 I'm not sure what you mean by "indexed". Specifically autocompletion? Linting? Workspace symbol indexing?

I mean that in a workspace with three TensorFlow based projects, - "Jumping to Definition" and all other features related to the Python Language Server (PLS) does work for only one folder out of three. Let's say I have projects A, B and C, and "Jump to Definition" works fine in the A project, but once I open a file from project B - the autocomplete and other features from PLS do not work.

@awav
Copy link
Author

awav commented Dec 4, 2019

@jakebailey, any update?

@jakebailey
Copy link
Member

jakebailey commented Dec 4, 2019

No, we would reply if there were. May I assume that by multiple projects in a workspace, you mean VS Code's multi-root workspace system and not just three folders in a single place?

@awav
Copy link
Author

awav commented Dec 4, 2019

May I assume that by multiple projects in a workspace, you mean VS Code's multi-root workspace system and not just three folders in a single place?

That's right. I have three folders in one workspace. If I open projects individually, the autocomplete works.

@MikhailArkhipov
Copy link

I am going to dupe against #1196.

@MikhailArkhipov MikhailArkhipov added the duplicate This issue or pull request already exists label Dec 16, 2019
@klajddd
Copy link

klajddd commented Jan 1, 2021

I am having the same issue:

I have a blank python file with these 2 lines:

a='llklk'

a.lower()

when trying to access the documentation of lower(), this error appears:

Unable to open 'python3.pyi': Unable to read file '/Users/MYUSERNAME/Library/Caches/Microsoft/Python Language Server/stubs.v4/5Gj0QnRdrb5AHReKMGD6k6EdoYIw-qZ4xCPncKJOn_k=/python3.pyi' (Error: Unable to resolve non-existing file '/Users/MYUSERNAME/Library/Caches/Microsoft/Python Language Server/stubs.v4/5Gj0QnRdrb5AHReKMGD6k6EdoYIw-qZ4xCPncKJOn_k=/python3.pyi').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants