Repository navigation
Probably a bug of Microsoft Python Language Server #3970
Copy link
Copy link
Closed
Labels
area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.31.0 insider
- Extension version (available under the Extensions sidebar): 2018.12.1
- OS and version: Win10 1809
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
- Relevant/affected Python packages and their versions: N/A
Expected behaviour
no error output
Actual behaviour
error output after opening a .py file
Steps to reproduce:
- open a .py file and wait a few second
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Microsoft Python Language Server version 0.1.72.0
Initializing for [hidden]\python.exe
[Error - 12:32:39 AM] System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.PythonTools.Analysis.AnalysisSet.Split[T](IAnalysisSet set, IReadOnlyList`1& ofType, IAnalysisSet& rest)
at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluatorAnnotationConverter.FinalizeNames(IAnalysisSet types)
at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluatorAnnotationConverter.MakeGeneric(IAnalysisSet baseType, IReadOnlyList`1 args)
at Microsoft.PythonTools.Parsing.Ast.TypeAnnotation.Walker.MakeGenericOp.Apply[T](TypeAnnotationConverter`1 converter, Stack`1 stack)
at Microsoft.PythonTools.Parsing.Ast.TypeAnnotation.Walker.GetResult[T](TypeAnnotationConverter`1 converter)
at Microsoft.PythonTools.Analysis.Values.TypingTypeInfo.<>c__DisplayClass8_0.<GetIndex>b__0(Node n)
at Microsoft.PythonTools.Analysis.Analyzer.InterpreterScope.GetOrMakeNodeValue(Node node, NodeValueKind kind, Func`2 maker)
at Microsoft.PythonTools.Analysis.AnalysisValueSetExtensions.GetIndex(IAnalysisSet self, Node node, AnalysisUnit unit, IAnalysisSet index)
at Microsoft.PythonTools.Analysis.Analyzer.ExpressionEvaluator.EvaluateWorker(Node node)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(ReturnStatement node)
at Microsoft.PythonTools.Parsing.Ast.ReturnStatement.Walk(PythonWalker walker)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Walk(SuiteStatement node)
at Microsoft.PythonTools.Parsing.Ast.SuiteStatement.Walk(PythonWalker walker)
at Microsoft.PythonTools.Analysis.Analyzer.FunctionAnalysisUnit.AnalyzeWorker(DDG ddg, CancellationToken cancel)
at Microsoft.PythonTools.Analysis.Analyzer.DDG.Analyze(Deque`1 queue, CancellationToken cancel, Action`1 reportQueueSize, Int32 reportQueueInterval)
at Microsoft.PythonTools.Analysis.PythonAnalyzer.AnalyzeQueuedEntries(CancellationToken cancel)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.GroupAnalysis.Analyze(CancellationToken cancel)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.HandleAnalyzable(IAnalyzable item, AnalysisPriority priority, CancellationToken cancellationToken)
at Microsoft.PythonTools.Intellisense.AnalysisQueue.ConsumerLoop()
##########Linting Output - pylint##########
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
XXX
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Activity
karrtikr commentedon Jan 14, 2019
You are using Microsoft Python Language Server version 0.1.72.0 as visible in
Outputpanel, try updating to the latest version.Check Issue #3977 with instructions on how to install the latest version of the language server:
jerryc05 commentedon Jan 15, 2019
Kartik Raj (@karrtikr) Hi, I upgraded Language Server to the latest 0.1.75.0 and the problem still exists. I even tried to change to the python distribution from python.org, but nothing changed. Any clue to fix it? thanks.
karrtikr commentedon Jan 15, 2019
jerryc05 (@jerryc05) Try reinstalling the vscode, Python extension to the latest version as well. There might be compatibility issues.
You can try troubleshooting using PYTHON_INTERACTIVE_TROUBLESHOOTING.md guide.
jerryc05 commentedon Jan 17, 2019
Kartik Raj (@karrtikr) Hi thank you for your advice but unfortunatelly it still did not work. Maybe I should submit an issue to the ms language server repo.
[-]Probably a bug of IntelliSense[/-][+]Probably a bug of Microsoft Python Language Server[/+]