Title: textDocument/definition returns wrong path on windows · Issue #85 · palantir/python-language-server · GitHub
Open Graph Title: textDocument/definition returns wrong path on windows · Issue #85 · palantir/python-language-server
X Title: textDocument/definition returns wrong path on windows · Issue #85 · palantir/python-language-server
Description: Notice the wrong path where d drive occurs twice. {"uri":"file:///D:\\D:\\tmp\\python-helloworld\\helloworld.py".... textDocument/documentSymbol seems to work. The log is from vim-lsp. 8/5/2017 3:59:30 PM:["lsp#register_server","server r...
Open Graph Description: Notice the wrong path where d drive occurs twice. {"uri":"file:///D:\\D:\\tmp\\python-helloworld\\helloworld.py".... textDocument/documentSymbol seems to work. The log is from vim-lsp. 8/5/2017 3:5...
X Description: Notice the wrong path where d drive occurs twice. {"uri":"file:///D:\\D:\\tmp\\python-helloworld\\helloworld.py".... textDocument/documentSymbol seems to work. The log is from v...
Opengraph URL: https://github.com/palantir/python-language-server/issues/85
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"textDocument/definition returns wrong path on windows","articleBody":"Notice the wrong path where d drive occurs twice. ```{\"uri\":\"file:///D:\\\\D:\\\\tmp\\\\python-helloworld\\\\helloworld.py\"...```. `textDocument/documentSymbol` seems to work.\r\n\r\nThe log is from `vim-lsp`.\r\n\r\n```vim\r\n8/5/2017 3:59:30 PM:[\"lsp#register_server\",\"server registered\",\"pyls\"]\r\n8/5/2017 3:59:30 PM:[\"lsp#register_server\",\"server registered\",\"rls\"]\r\n8/5/2017 3:59:30 PM:[\"s:on_text_document_did_open()\",1]\r\n8/5/2017 3:59:30 PM:[{\"response\":{\"data\":{\"__data__\":\"vim-lsp\",\"lps_id\":1,\"server_name\":\"pyls\"},\"message\":\"started lsp server successfully\"}}]\r\n8/5/2017 3:59:30 PM:[\"---\u003e\",1,\"pyls\",{\"method\":\"initialize\",\"params\":{\"rootUri\":\"file:///D:/tmp/python-helloworld\",\"capabilities\":{},\"rootPath\":\"file:///D:/tmp/python-helloworld\"}}]\r\n8/5/2017 3:59:34 PM:[\"\u003c---\",1,\"pyls\",{\"response\":{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"capabilities\":{\"codeLensProvider\":{\"resolveProvider\":false},\"executeCommandProvider\":{\"commands\":[]},\"hoverProvider\":true,\"documentFormattingProvider\":true,\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\"]},\"documentSymbolProvider\":true,\"definitionProvider\":true,\"completionProvider\":{\"resolveProvider\":false,\"triggerCharacters\":[\".\"]},\"codeActionProvider\":true,\"referencesProvider\":true,\"documentRangeFormattingProvider\":true,\"textDocumentSync\":2}}},\"request\":{\"method\":\"initialize\",\"jsonrpc\":\"2.0\",\"id\":1,\"params\":{\"rootUri\":\"file:///D:/tmp/python-helloworld\",\"capabilities\":{},\"rootPath\":\"file:///D:/tmp/python-helloworld\"}}}]\r\n8/5/2017 3:59:34 PM:[\"---\u003e\",1,\"pyls\",{\"method\":\"textDocument/didOpen\",\"params\":{\"textDocument\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"version\":1,\"languageId\":\"python\",\"text\":\"#!/usr/bin/env python\\nclass MyClass:\\n variable = \\\"blah\\\"\\n\\n def function(self):\\n print(\\\"This is a message inside the class.\\\")\\n\\nmyobjectx = MyClass()\\n\\nmyobjectx.variable\"}}}]\r\n8/5/2017 3:59:34 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"filetype\":\"python\",\"server_name\":\"pyls\"},\"message\":\"textDocument/open sent\"}}]\r\n8/5/2017 3:59:34 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"not dirty\"}}]\r\n8/5/2017 3:59:34 PM:[\"\u003c---(stderr)\",1,\"pyls\",[\"2017-08-05 15:59:34,223 UTC - ERROR - pyls.language_server - CAUGHT\\r\",\"Traceback (most recent call last):\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\language_server.py\\\", line 65, in wrapped\\r\",\" return func(*args, **kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 111, in m_text_document__did_open\\r\",\" self.lint(textDocument['uri'])\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 93, in lint\\r\",\" self._hooks.pyls_lint, doc_uri\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 58, in _hook\\r\",\" return hook(config=self.config, workspace=self.workspace, document=doc, **kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 745, in __call__\\r\",\" return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 339, in _hookexec\\r\",\" return self._inner_hookexec(hook, methods, kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 302, in __call__\\r\",\" return outcome.get_result()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 280, in get_result\\r\",\" _reraise(*ex) # noqa\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 265, in __init__\\r\",\" self.result = func()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 300, in \u003clambda\u003e\\r\",\" outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 334, in \u003clambda\u003e\\r\",\" _MultiCall(methods, kwargs, hook.spec_opts).execute()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 614, in execute\\r\",\" res = hook_impl.function(*args)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\plugins\\\\pycodestyle_lint.py\\\", line 15, in pyls_lint\\r\",\" config_files = config.find_parents(document.path, CONFIG_FILES)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\config.py\\\", line 37, in find_parents\\r\",\" return find_parents(self.root_path, path, names)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\config.py\\\", line 70, in find_parents\\r\",\" raise ValueError(\\\"Path %s not in %s\\\" % (path, root))\\r\",\"ValueError: Path /D:/tmp/python-helloworld/helloworld.py not in file:///D:/tmp/python-helloworld\\r\",\"2017-08-05 15:59:34,226 UTC - ERROR - jsonrpc.manager - API Exception: {'message': 'Path /D:/tmp/python-helloworld/helloworld.py not in file:///D:/tmp/python-helloworld', 'args': (u'Path /D:/tmp/python-helloworld/helloworld.py not in file:///D:/tmp/python-helloworld',), 'type': 'ValueError'}\\r\",\"Traceback (most recent call last):\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\jsonrpc\\\\manager.py\\\", line 108, in _get_responses\\r\",\" result = method(*request.args, **request.kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\language_server.py\\\", line 65, in wrapped\\r\",\" return func(*args, **kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 111, in m_text_document__did_open\\r\",\" self.lint(textDocument['uri'])\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 93, in lint\\r\",\" self._hooks.pyls_lint, doc_uri\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\python_ls.py\\\", line 58, in _hook\\r\",\" return hook(config=self.config, workspace=self.workspace, document=doc, **kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 745, in __call__\\r\",\" return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 339, in _hookexec\\r\",\" return self._inner_hookexec(hook, methods, kwargs)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 302, in __call__\\r\",\" return outcome.get_result()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 280, in get_result\\r\",\" _reraise(*ex) # noqa\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 265, in __init__\\r\",\" self.result = func()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 300, in \u003clambda\u003e\\r\",\" outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 334, in \u003clambda\u003e\\r\",\" _MultiCall(methods, kwargs, hook.spec_opts).execute()\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pluggy.py\\\", line 614, in execute\\r\",\" res = hook_impl.function(*args)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\plugins\\\\pycodestyle_lint.py\\\", line 15, in pyls_lint\\r\",\" config_files = config.find_parents(document.path, CONFIG_FILES)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\config.py\\\", line 37, in find_parents\\r\",\" return find_parents(self.root_path, path, names)\\r\",\" File \\\"c:\\\\python27\\\\lib\\\\site-packages\\\\pyls\\\\config.py\\\", line 70, in find_parents\\r\",\" raise ValueError(\\\"Path %s not in %s\\\" % (path, root))\\r\",\"ValueError: Path /D:/tmp/python-helloworld/helloworld.py not in file:///D:/tmp/python-helloworld\\r\",\"\"]]\r\n8/5/2017 3:59:37 PM:[{\"response\":{\"data\":{\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"server already started\"}}]\r\n8/5/2017 3:59:37 PM:[{\"response\":{\"data\":{\"__data__\":\"vim-lsp\",\"init_result\":{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"capabilities\":{\"codeLensProvider\":{\"resolveProvider\":false},\"executeCommandProvider\":{\"commands\":[]},\"hoverProvider\":true,\"documentFormattingProvider\":true,\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\"]},\"documentSymbolProvider\":true,\"definitionProvider\":true,\"completionProvider\":{\"resolveProvider\":false,\"triggerCharacters\":[\".\"]},\"codeActionProvider\":true,\"referencesProvider\":true,\"documentRangeFormattingProvider\":true,\"textDocumentSync\":2}}},\"server_name\":\"pyls\"},\"message\":\"lsp server already initialized\"}}]\r\n8/5/2017 3:59:37 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"already opened\"}}]\r\n8/5/2017 3:59:37 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"not dirty\"}}]\r\n8/5/2017 3:59:37 PM:[\"---\u003e\",1,\"pyls\",{\"method\":\"textDocument/documentSymbol\",\"on_notification\":\"---funcref---\",\"params\":{\"textDocument\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\"}}}]\r\n8/5/2017 3:59:37 PM:[\"\u003c---\",1,\"pyls\",{\"response\":{\"id\":2,\"jsonrpc\":\"2.0\",\"result\":[{\"location\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"range\":{\"end\":{\"character\":13,\"line\":1},\"start\":{\"character\":6,\"line\":1}}},\"name\":\"MyClass\",\"kind\":5},{\"location\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"range\":{\"end\":{\"character\":12,\"line\":2},\"start\":{\"character\":4,\"line\":2}}},\"name\":\"variable\",\"kind\":13},{\"location\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"range\":{\"end\":{\"character\":9,\"line\":7},\"start\":{\"character\":0,\"line\":7}}},\"name\":\"myobjectx\",\"kind\":13}]},\"request\":{\"method\":\"textDocument/documentSymbol\",\"jsonrpc\":\"2.0\",\"id\":2,\"params\":{\"textDocument\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\"}}}}]\r\n8/5/2017 3:59:37 PM:[\"s:on_text_document_did_open()\",2]\r\n8/5/2017 3:59:43 PM:[\"s:on_text_document_did_close()\",2]\r\n8/5/2017 3:59:46 PM:[{\"response\":{\"data\":{\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"server already started\"}}]\r\n8/5/2017 3:59:46 PM:[{\"response\":{\"data\":{\"__data__\":\"vim-lsp\",\"init_result\":{\"id\":1,\"jsonrpc\":\"2.0\",\"result\":{\"capabilities\":{\"codeLensProvider\":{\"resolveProvider\":false},\"executeCommandProvider\":{\"commands\":[]},\"hoverProvider\":true,\"documentFormattingProvider\":true,\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\"]},\"documentSymbolProvider\":true,\"definitionProvider\":true,\"completionProvider\":{\"resolveProvider\":false,\"triggerCharacters\":[\".\"]},\"codeActionProvider\":true,\"referencesProvider\":true,\"documentRangeFormattingProvider\":true,\"textDocumentSync\":2}}},\"server_name\":\"pyls\"},\"message\":\"lsp server already initialized\"}}]\r\n8/5/2017 3:59:46 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"already opened\"}}]\r\n8/5/2017 3:59:46 PM:[{\"response\":{\"data\":{\"path\":\"file:///D:/tmp/python-helloworld/helloworld.py\",\"__data__\":\"vim-lsp\",\"server_name\":\"pyls\"},\"message\":\"not dirty\"}}]\r\n8/5/2017 3:59:46 PM:[\"---\u003e\",1,\"pyls\",{\"method\":\"textDocument/definition\",\"on_notification\":\"---funcref---\",\"params\":{\"textDocument\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\"},\"position\":{\"character\":15,\"line\":7}}}]\r\n8/5/2017 3:59:46 PM:[\"\u003c---\",1,\"pyls\",{\"response\":{\"id\":3,\"jsonrpc\":\"2.0\",\"result\":[{\"uri\":\"file:///D:\\\\D:\\\\tmp\\\\python-helloworld\\\\helloworld.py\",\"range\":{\"end\":{\"character\":13,\"line\":1},\"start\":{\"character\":6,\"line\":1}}}]},\"request\":{\"method\":\"textDocument/definition\",\"jsonrpc\":\"2.0\",\"id\":3,\"params\":{\"textDocument\":{\"uri\":\"file:///D:/tmp/python-helloworld/helloworld.py\"},\"position\":{\"character\":15,\"line\":7}}}}]\r\n8/5/2017 3:59:46 PM:[\"s:on_text_document_did_open()\",4]\r\n```","author":{"url":"https://github.com/prabirshrestha","@type":"Person","name":"prabirshrestha"},"datePublished":"2017-08-05T23:06:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/85/python-language-server/issues/85"}
| 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:9f9ccc0e-1529-2b02-0b1f-677fea31e2dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D1EA:300F93:447920B:5AACE5D:6A5D7AC2 |
| html-safe-nonce | e37cc00aa42f11af4d6e8b9946d388d61402bb0dd0ac23d6e44a90bcf5a1d7e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUVBOjMwMEY5Mzo0NDc5MjBCOjVBQUNFNUQ6NkE1RDdBQzIiLCJ2aXNpdG9yX2lkIjoiMzA4Njk0ODU4NjkwNDk3NjA2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6ea92db643f3a53fd669f339a1b7ddf66ee010fe61b9b733edeedf9e6eb2a006 |
| hovercard-subject-tag | issue:248214613 |
| 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/palantir/python-language-server/85/issue_layout |
| twitter:image | https://opengraph.githubassets.com/67da283299f5977a705fb4382e001aac5208033cd7155c3486ceb20ed6feab62/palantir/python-language-server/issues/85 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/67da283299f5977a705fb4382e001aac5208033cd7155c3486ceb20ed6feab62/palantir/python-language-server/issues/85 |
| og:image:alt | Notice the wrong path where d drive occurs twice. {"uri":"file:///D:\\D:\\tmp\\python-helloworld\\helloworld.py".... textDocument/documentSymbol seems to work. The log is from vim-lsp. 8/5/2017 3:5... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | prabirshrestha |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/palantir/python-language-server git https://github.com/palantir/python-language-server.git |
| octolytics-dimension-user_id | 303157 |
| octolytics-dimension-user_login | palantir |
| octolytics-dimension-repository_id | 78797564 |
| octolytics-dimension-repository_nwo | palantir/python-language-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 78797564 |
| octolytics-dimension-repository_network_root_nwo | palantir/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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width