Environment data
- Language Server version: 0.4.22
- OS and version: Ubuntu 19.04
- Python version (& distribution if applicable, e.g. Anaconda): 2.7.15
Expected behaviour
Completion completes.
Actual behaviour
The error happens when doing regular completion on a file, the logs shows the error related to caching. Tried removing the cache folder in ~/snap/common/.cache/Microsoft but didn't help. Also changed the python.analysis.cachingLevel to None and Library but issue was still showing.
The first traceback shows when the cachingLevel is set to Library, second traceback is when I remove the python.analysis.cachingLevel fromt the options and let it have the default value or None.
Logs
Analysis of models.core.server (User) queued. Dependencies: datetime, dateutil.parser, sqlobject, turbogears, turbogears.identity, turbogears.visit, turbogears.config, urlparse, ipaddress, itertools, models.masterdb, models.core.server_facts, models.core.metric_category, models.core.network_service_discovery, models.core.resource_matcher, models.core.snmp_traps, models.core.custom_incident_filter, models.core.snmp_port_discovery, models.core.countermeasures, models.core.maintenance_period, models.core.delta, models.core.elasticflow, models.core.outage_escalation, models.core.cloud, models.core.monitornode, models.core.availability, tasks.ops, pprint, models.core.dashboard, tasks.monitoring_policy
[Error - 3:19:07 PM] Request textDocument/documentSymbol failed.
Message: One or more errors occurred. (Object reference not set to an instance of an object.)
Code: -32000
at Microsoft.Python.LanguageServer.Indexing.MostRecentDocumentSymbols.<>c.<GetSymbolsAsync>b__11_0(Task`1 t) in E:\A\_work\8\s\src\LanguageServer\Impl\Indexing\MostRecentDocumentSymbols.cs:line 81
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, 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, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Python.LanguageServer.Implementation.Server.HierarchicalDocumentSymbol(DocumentSymbolParams params, CancellationToken cancellationToken) in E:\A\_work\8\s\src\LanguageServer\Impl\Implementation\Server.Symbols.cs:line 37
at Microsoft.Python.LanguageServer.Implementation.LanguageServer.DocumentSymbol(JToken token, CancellationToken cancellationToken) in E:\A\_work\8\s\src\LanguageServer\Impl\LanguageServer.cs:line 216
Analysis of models.core.server (User) queued. Dependencies: datetime, dateutil.parser, sqlobject, turbogears, turbogears.identity, turbogears.visit, turbogears.config, urlparse, ipaddress, itertools, models.masterdb, models.core.server_facts, models.core.metric_category, models.core.network_service_discovery, models.core.resource_matcher, models.core.snmp_traps, models.core.custom_incident_filter, models.core.snmp_port_discovery, models.core.countermeasures, models.core.maintenance_period, models.core.delta, models.core.elasticflow, models.core.outage_escalation, models.core.cloud, models.core.monitornode, models.core.availability, tasks.ops, pprint, models.core.dashboard, tasks.monitoring_policy
Create compiled (scraped): System /home/cllamach/.vscode/extensions/ms-python.python-2019.10.37374-dev/languageServer.0.4.22/System.Globalization.Native.so /home/cllamach/.vscode/extensions/ms-python.python-2019.10.37374-dev/languageServer.0.4.22
Invalidated cached module /home/cllamach/snap/code/common/.cache/Microsoft/Python Language Server/stubs.v2/Wze56EAsxY7lJj0Ft-F_zT_r3hZrJgsJRF0zH1rz0Fc=/System.Globalization.Native.pyi. Reason: Cached file does not exist
[Error - 3:27:35 PM] Request textDocument/documentSymbol failed.
Message: One or more errors occurred. (Not a valid Python module: /home/cllamach/.vscode/extensions/ms-python.python-2019.10.37374-dev/languageServer.0.4.22/System.Globalization.Native.so)
Code: -32000
at Microsoft.Python.LanguageServer.Indexing.MostRecentDocumentSymbols.<>c.<GetSymbolsAsync>b__11_0(Task`1 t) in E:\A\_work\8\s\src\LanguageServer\Impl\Indexing\MostRecentDocumentSymbols.cs:line 81
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, 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, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Python.LanguageServer.Implementation.Server.HierarchicalDocumentSymbol(DocumentSymbolParams params, CancellationToken cancellationToken) in E:\A\_work\8\s\src\LanguageServer\Impl\Implementation\Server.Symbols.cs:line 37
at Microsoft.Python.LanguageServer.Implementation.LanguageServer.DocumentSymbol(JToken token, CancellationToken cancellationToken) in E:\A\_work\8\s\src\LanguageServer\Impl\LanguageServer.cs:line 216
Code Snippet / Additional lnformation
Environment data
Expected behaviour
Completion completes.
Actual behaviour
The error happens when doing regular completion on a file, the logs shows the error related to caching. Tried removing the cache folder in
~/snap/common/.cache/Microsoftbut didn't help. Also changed thepython.analysis.cachingLeveltoNoneandLibrarybut issue was still showing.The first traceback shows when the cachingLevel is set to
Library, second traceback is when I remove thepython.analysis.cachingLevelfromt the options and let it have the default value orNone.Logs
Code Snippet / Additional lnformation
XXX