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

Import with ",." throws out of bounds exception #738

Closed
jakebailey opened this issue Mar 13, 2019 · 0 comments
Closed

Import with ",." throws out of bounds exception #738

jakebailey opened this issue Mar 13, 2019 · 0 comments
Assignees
Labels
bug Something isn't working feature: intellisense
Milestone

Comments

@jakebailey
Copy link
Member

import os,.

Type the . after the ,, and you get:

[Error - 5:10:47 PM] Request textDocument/completion failed.
  Message: Index was outside the bounds of the array.
  Code: -32000 
   at Microsoft.Python.Analysis.Analyzer.Handlers.ImportHandler.HandleImport(ModuleName moduleImportExpression, NameExpression asNameExpression, Boolean forceAbsolute) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\Handlers\ImportHandler.cs:line 53
   at Microsoft.Python.Analysis.Analyzer.Handlers.ImportHandler.HandleImport(ImportStatement node) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\Handlers\ImportHandler.cs:line 43
   at Microsoft.Python.Parsing.Ast.ImportStatement.Walk(PythonWalker walker) in C:\Users\jabaile\python-language-server\src\Parsing\Impl\Ast\ImportStatement.cs:line 51
   at Microsoft.Python.Parsing.Ast.SuiteStatement.Walk(PythonWalker walker) in C:\Users\jabaile\python-language-server\src\Parsing\Impl\Ast\SuiteStatement.cs:line 38
   at Microsoft.Python.Parsing.Ast.PythonAst.Walk(PythonWalker walker) in C:\Users\jabaile\python-language-server\src\Parsing\Impl\Ast\PythonAst.cs:line 82
   at Microsoft.Python.Analysis.Analyzer.PythonAnalyzer.Analyze(IDependencyChainNode`1 node, Int32 version, Stopwatch stopWatch, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\PythonAnalyzer.cs:line 275
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Python.Analysis.Analyzer.PythonAnalyzerEntry.<>c.<GetAnalysisAsync>b__27_0(Task`1 t) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\PythonAnalyzerEntry.cs:line 48
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.Python.Analysis.Analyzer.PythonAnalyzer.GetAnalysisAsync(PythonAnalyzerEntry entry, CancellationToken timeoutCt, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\PythonAnalyzer.cs:line 91
   at Microsoft.Python.Analysis.Analyzer.PythonAnalyzer.GetAnalysisAsync(IPythonModule module, Int32 waitTime, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\Analysis\Ast\Impl\Analyzer\PythonAnalyzer.cs:line 84
   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 36
   at Microsoft.Python.LanguageServer.Implementation.LanguageServer.Completion(JToken token, CancellationToken cancellationToken) in C:\Users\jabaile\python-language-server\src\LanguageServer\Impl\LanguageServer.cs:line 239
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feature: intellisense
Projects
None yet
Development

No branches or pull requests

2 participants