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

Language Server 0.2.16 crashes (Request textDocument/completion failed.) #716

Closed
tomrunia opened this issue Mar 7, 2019 · 0 comments
Closed
Assignees

Comments

@tomrunia
Copy link

tomrunia commented Mar 7, 2019

Because earlier versions of LS have a memory leak (#450) I decided to upgrade to version 0.2.16 following the comment in the issue thread. However, version 0.2.16 crashes almost immediatly.

Steps to Reproduce

  1. Open a new file in VSCode
  2. Save the file, e.g. bugreport.py
  3. Type some Python code, I wrote import numpy as np
  4. Crash:
[Info  - 1:30:47 PM] Microsoft Python Language Server version 0.2.16.0
[Info  - 1:30:47 PM] Initializing for /usr/bin/python3.7
[Error - 1:30:48 PM] Request textDocument/completion failed.
  Message: Specified argument was out of the range of valid values.
Parameter name: index
  Code: -32000 
   at System.Char.IsLetter(String s, Int32 index)
   at Microsoft.Python.LanguageServer.Completion.CompletionItemSource.CreateCompletionItem(String text, CompletionItemKind kind)
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.Python.LanguageServer.Completion.ImportCompletion.TryGetCompletions(ImportStatement import, CompletionContext context)
   at Microsoft.Python.LanguageServer.Completion.CompletionSource.GetCompletions(IDocumentAnalysis analysis, SourceLocation location)
   at Microsoft.Python.LanguageServer.Implementation.Server.Completion(CompletionParams params, CancellationToken cancellationToken)
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Completion(JToken token, CancellationToken cancellationToken)

VSCode Setup:

Version: 1.31.1
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:19:29.629Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.13.0-26-generic

Python Setup:

  • virtualenv with Python 3.7
  • system version of Python
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants