Title: IndexError in signature.py on textDocument/signatureHelp · Issue #459 · palantir/python-language-server · GitHub
Open Graph Title: IndexError in signature.py on textDocument/signatureHelp · Issue #459 · palantir/python-language-server
X Title: IndexError in signature.py on textDocument/signatureHelp · Issue #459 · palantir/python-language-server
Description: I'm using pyls via coc.nvim, and when it attempts to grab the signature of a class method, it's throwing an IndexError on this line: python-language-server/pyls/plugins/signature.py Line 24 in d7fb817 'label': s.docstring().splitlines()[...
Open Graph Description: I'm using pyls via coc.nvim, and when it attempts to grab the signature of a class method, it's throwing an IndexError on this line: python-language-server/pyls/plugins/signature.py Line 24 in d7fb...
X Description: I'm using pyls via coc.nvim, and when it attempts to grab the signature of a class method, it's throwing an IndexError on this line: python-language-server/pyls/plugins/signature.py Line 24...
Opengraph URL: https://github.com/palantir/python-language-server/issues/459
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IndexError in signature.py on textDocument/signatureHelp","articleBody":"I'm using pyls via [coc.nvim](https://github.com/neoclide/coc.nvim), and when it attempts to grab the signature of a class method, it's throwing an IndexError on this line:\r\n\r\nhttps://github.com/palantir/python-language-server/blob/d7fb817e8f992bd5c6a287f5afb5e999a1e29449/pyls/plugins/signature.py#L24\r\n\r\nIt looks like in this case `s.docstring()` is somehow not returning a string, which causes `splitlines()` to not return an array, and `[0]` causes the error.\r\n\r\nThis was easy to mitigate by just catching that error and returning returning `.splitlines()` without the index, but I wanted to flag it here in case your team might have a better idea for why/when that wouldn't return an array, and what the right way to mitigate it is.\r\n\r\n\r\n","author":{"url":"https://github.com/mike-hearn","@type":"Person","name":"mike-hearn"},"datePublished":"2018-12-09T18:30:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/459/python-language-server/issues/459"}
| 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:eb95be69-48ac-f323-9519-aaf5bfc0e3f4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E494:1E1EE3:6CB3FF5:953F99E:6A5EA383 |
| html-safe-nonce | da2e21d4616c8ef1ed8ad96e6602d7134463c225c86250249bac479ad21c0a82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDk0OjFFMUVFMzo2Q0IzRkY1Ojk1M0Y5OUU6NkE1RUEzODMiLCJ2aXNpdG9yX2lkIjoiODE2NjU1Nzk5NTAxMjg5MTUyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d4fa68ad19b01b411b2ffcd9625f1a4febed4f73f7696648b190335b62c598d0 |
| hovercard-subject-tag | issue:389050090 |
| 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/459/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6e14a93ed38ca98585021240df5df64228f62573b7f919bd500bfbc417e204b/palantir/python-language-server/issues/459 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6e14a93ed38ca98585021240df5df64228f62573b7f919bd500bfbc417e204b/palantir/python-language-server/issues/459 |
| og:image:alt | I'm using pyls via coc.nvim, and when it attempts to grab the signature of a class method, it's throwing an IndexError on this line: python-language-server/pyls/plugins/signature.py Line 24 in d7fb... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mike-hearn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| 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 | 2d2ac9bdd71d5f53f2b731c9330677e38624e301 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width