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" #597

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

Comments

@jakebailey
Copy link
Member

jakebailey commented Feb 13, 2019

Completions in untitled:Untitled-1 at (0, 8)
[Error - 10:40:55 AM] Request textDocument/completion failed.
  Message: One or more errors occurred. (Module path should be rooted)
  Code: -32000 
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.Server.GetAnalysis(Uri uri, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\Server.Documents.cs:line 72
   at Microsoft.Python.LanguageServer.Implementation.Server.Completion(CompletionParams params, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\Implementation\Server.Editor.cs:line 35
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Completion(JToken token, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\LanguageServer.cs:line 238

To reproduce:

  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).

The LS seems to analyze it, but breaks when it goes to serve a request.

@MikhailArkhipov MikhailArkhipov self-assigned this Feb 13, 2019
@MikhailArkhipov MikhailArkhipov added this to the Feb 2019.1 milestone Feb 13, 2019
@MikhailArkhipov MikhailArkhipov added the bug Something isn't working label Feb 13, 2019
@qubitron qubitron modified the milestones: Feb 2019.2, March 2019.1 Feb 20, 2019
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

4 participants