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

Switching language mode to Python on an unsaved file throws "Module path should be rooted" #598

Closed
jakebailey opened this issue Feb 13, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jakebailey
Copy link
Member

On the old LS in release:

Opening document untitled:Untitled-1
[Error - 10:48:38 AM] Request textDocument/completion failed.
  Message: unknown document
  Code: -32000 
   at Microsoft.Python.LanguageServer.Implementation.ProjectFiles.GetEntry(Uri documentUri, Boolean throwIfMissing) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\ProjectFiles.cs:line 53
   at Microsoft.Python.LanguageServer.Implementation.ProjectFiles.GetEntry(TextDocumentIdentifier document, Nullable`1 expectedVersion, ProjectEntry& entry, PythonAst& tree) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\ProjectFiles.cs:line 59
   at Microsoft.Python.LanguageServer.Implementation.Server.Completion(CompletionParams params, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\Server.Completion.cs:line 34
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Completion(JToken token, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\LanguageServer.cs:line 301

The file gets opened, but doesn't seem to get added anywhere, nor analyzed. This may also be causing exceptions on file updates which I'm not sure are logged in the output panel.

To reproduce (same as #597):

  1. Open a new file in VSC, do not save.
  2. Use the command palette to change the language mode to Python.
  3. Try to use the analysis (completion, hover, etc).
@MikhailArkhipov
Copy link

That was fixed with #837

@jakebailey
Copy link
Member Author

Yup, this was the issue for the old LS (which is now defunct).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants