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

InvalidOperationException in PathResolverSnapshot.TryFindModule #599

Closed
jakebailey opened this issue Feb 13, 2019 · 2 comments
Closed

InvalidOperationException in PathResolverSnapshot.TryFindModule #599

jakebailey opened this issue Feb 13, 2019 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@jakebailey
Copy link
Member

Seeing this stack trace happening pretty often in the RPC exceptions:

 at Microsoft.PythonTools.Analysis.DependencyResolution.PathResolverSnapshot.TryFindModule(String modulePath, Edge& lastEdge, StringSpan& unmatchedPathSpan)
 at Microsoft.PythonTools.Analysis.DependencyResolution.PathResolverSnapshot.AddModulePath(String& modulePath, String& fullModuleName)
 at Microsoft.PythonTools.Analysis.PythonAnalyzer.AddModule(String moduleName, String filePath, Uri documentUri, IAnalysisCookie cookie)
 at Microsoft.Python.LanguageServer.Implementation.Server.AddFileAsync(Uri documentUri, IAnalysisCookie cookie)
 at Microsoft.Python.LanguageServer.Implementation.Server.DidOpenTextDocument(DidOpenTextDocumentParams params, CancellationToken token)
 at Microsoft.Python.LanguageServer.Implementation.LanguageServer.DidOpenTextDocument(JToken token, CancellationToken cancellationToken)

Seems to be thrown whenever a module gets added that isn't rooted, but I haven't been able to actually reproduce it. It feels like it should be related to #598, but I don't get past that issue's trace.

@AlexanderSher I believe this would be carried over to the new LS, so would continue to impact things. Is there a better mechanism for handling this scenario rather than throwing an exception and bailing out?

@AlexanderSher
Copy link
Contributor

It is a good question how we end up with the non-rooted path.

@MikhailArkhipov MikhailArkhipov added this to the Feb 2019.2 milestone Feb 15, 2019
@MikhailArkhipov
Copy link

Merging into #597

@MikhailArkhipov MikhailArkhipov added the duplicate This issue or pull request already exists label Mar 3, 2019
@MikhailArkhipov MikhailArkhipov removed this from the March 2019.1 milestone Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants