Title: NRE from ToAbsolutePath via DefinitionSourceBase.TryFromVariable · Issue #1534 · microsoft/python-language-server · GitHub
Open Graph Title: NRE from ToAbsolutePath via DefinitionSourceBase.TryFromVariable · Issue #1534 · microsoft/python-language-server
X Title: NRE from ToAbsolutePath via DefinitionSourceBase.TryFromVariable · Issue #1534 · microsoft/python-language-server
Description: at Microsoft.Python.Core.UriExtensions.ToAbsolutePath(Uri uri) in E:\A\_work\3\s\src\Core\Impl\Extensions\UriExtensions.cs:line 22 at Microsoft.Python.Analysis.Modules.PythonModule.get_Definition() in E:\A\_work\3\s\src\Analysis\Ast\Impl...
Open Graph Description: at Microsoft.Python.Core.UriExtensions.ToAbsolutePath(Uri uri) in E:\A\_work\3\s\src\Core\Impl\Extensions\UriExtensions.cs:line 22 at Microsoft.Python.Analysis.Modules.PythonModule.get_Definition()...
X Description: at Microsoft.Python.Core.UriExtensions.ToAbsolutePath(Uri uri) in E:\A\_work\3\s\src\Core\Impl\Extensions\UriExtensions.cs:line 22 at Microsoft.Python.Analysis.Modules.PythonModule.get_Definition()...
Opengraph URL: https://github.com/microsoft/python-language-server/issues/1534
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"NRE from ToAbsolutePath via DefinitionSourceBase.TryFromVariable","articleBody":"```\r\n at Microsoft.Python.Core.UriExtensions.ToAbsolutePath(Uri uri) in E:\\A\\_work\\3\\s\\src\\Core\\Impl\\Extensions\\UriExtensions.cs:line 22\r\n at Microsoft.Python.Analysis.Modules.PythonModule.get_Definition() in E:\\A\\_work\\3\\s\\src\\Analysis\\Ast\\Impl\\Modules\\PythonModule.cs:line 173\r\n at Microsoft.Python.LanguageServer.Sources.DefinitionSourceBase.TryFromVariable(String name, IDocumentAnalysis analysis, SourceLocation location, Node statement, ILocatedMember& definingMember) in E:\\A\\_work\\3\\s\\src\\LanguageServer\\Impl\\Sources\\DefinitionSource.cs:line 209\r\n at Microsoft.Python.LanguageServer.Sources.DefinitionSourceBase.FindDefinition(IDocumentAnalysis analysis, SourceLocation location, ILocatedMember& definingMember) in E:\\A\\_work\\3\\s\\src\\LanguageServer\\Impl\\Sources\\DefinitionSource.cs:line 105\r\n at Microsoft.Python.LanguageServer.Implementation.Server.GotoDefinition(TextDocumentPositionParams params, CancellationToken cancellationToken) in E:\\A\\_work\\3\\s\\src\\LanguageServer\\Impl\\Implementation\\Server.Editor.cs:\r\n```\r\n\r\nSimilar to #1018 but a different backtrace. This comes from a `PythonModule` with a null URI. The code in `PythonModule` is written to allow null URIs `uri?.LocalPath`, but the `Definition` property still constructs a `LocationInfo` unconditionally.\r\n\r\nI almost think `LocationInfo` could do with some cleanup; it double-stores paths via URI and filepath, among some other weirdness with `PythonModule.FilePath` being inconsistent with `LocationInfo` being \"absolute\" in some places but not others...","author":{"url":"https://github.com/jakebailey","@type":"Person","name":"jakebailey"},"datePublished":"2019-09-10T22:55:34Z","url":"https://github.com/microsoft/python-language-server/issues/1534"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e3e781f1-1b6f-cd29-2db4-5b5f41656ca7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3CA:2530C8:359790:489CD7:6AFE5252 |
| html-safe-nonce | 7a49176a3ffd164ac81f88a7098d4882a65d98b711bb574f9a54ca34dab3973e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0NBOjI1MzBDODozNTk3OTA6NDg5Q0Q3OjZBRkU1MjUyIiwidmlzaXRvcl9pZCI6Ijg4MzA0NjMwNzAyOTI1NjI1MTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d87b7b93533da36d896e30eac5a814a98beae0cf3726f450d7aeb2989f09fa2e |
| hovercard-subject-tag | issue:491936111 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/1534/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa73f64af3b21a985cf42e061afbfdc5f12c63acb12efe58baa5ced54054cfba/microsoft/python-language-server/issues/1534 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa73f64af3b21a985cf42e061afbfdc5f12c63acb12efe58baa5ced54054cfba/microsoft/python-language-server/issues/1534 |
| og:image:alt | at Microsoft.Python.Core.UriExtensions.ToAbsolutePath(Uri uri) in E:\A\_work\3\s\src\Core\Impl\Extensions\UriExtensions.cs:line 22 at Microsoft.Python.Analysis.Modules.PythonModule.get_Definition()... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jakebailey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3ad2b58e42f481583284b895305360b61b0223636c9dde6d696b575347163a26 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 145901977 |
| octolytics-dimension-repository_nwo | microsoft/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 145901977 |
| octolytics-dimension-repository_network_root_nwo | microsoft/python-language-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8df44dbe1c8091b38c3e0165c05a1e5c1563762e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width