Closed alkurbatov closed 1 month ago
Could you try using the following config and test again? pyright needs some cmd line arguments.
(add-to-list 'lspce-server-programs '("python" "pyright-langserver" "--stdio"))
Thank you! Yeah, now it works. But I would suggest to handle that "stderr reach EOF" since it spams a lot.
But I would suggest to handle that "stderr reach EOF" since it spams a lot.
You're welcome. I found this problem too and I have commented that line locally. I'll push it upstream.
Steps to reproduce:
Enable pyright in the config, e.g.:
Open Python file:
from pandas import DataFrame
def main() -> int: d = DataFrame() lg = bs.login() print("AAAA") return 0
main()
2024-07-07 14:13:41.743 - start initializing server for lsp_type python in project file:///Users/alkurbatov/work/src/github.com/alkurbatov/tttt 2024-07-07 14:13:41.743 - emacs_exec_path: 2024-07-07 14:13:41.743 - initialize request "{\"id\":\"1000000001\",\"method\":\"initialize\",\"request_tick\":\"91/Users/alkurbatov/work/src/github.com/alkurbatov/tttt/tttt/main.py\",\"params\":{\"processId\":94493,\"rootUri\":\"file:///Users/alkurbatov/work/src/github.com/alkurbatov/tttt\",\"capabilities\":{\"workspace\":{\"applyEdit\":false,\"executeCommand\":{\"dynamicRegistration\":false},\"workspaceEdit\":{\"documentChanges\":true,\"resourceOperations\":[\"create\",\"rename\",\"delete\"]},\"didChangeConfiguration\":{\"dynamicRegistration\":false},\"symbol\":{\"dynamicRegistration\":false},\"configuration\":false,\"workspaceFolders\":false},\"textDocument\":{\"synchronization\":{\"dynamicRegistration\":false,\"willSave\":true,\"didSave\":true},\"completion\":{\"dynamicRegistration\":false,\"completionItem\":{\"snippetSupport\":false,\"commitCharactersSupport\":false,\"documentationFormat\":[\"markdown\",\"plaintext\"],\"deprecatedSupport\":true,\"tagSupport\":{\"valueSet\":[1]},\"preselectSupoort\":false,\"insertReplaceSupport\":false,\"resolveSupport\":{\"properties\":[\"documentation\",\"details\",\"additionalTextEdits\"]}},\"contextSupport\":true},\"hover\":{\"dynamicRegistration\":false,\"contentFormat\":[\"markdown\",\"plaintext\"]},\"signatureHelp\":{\"dynamicRegistration\":false,\"signatureInformation\":{\"documentationFormat\":[\"markdown\",\"plaintext\"],\"parameterInformation\":{\"labelOffsetSupport\":false},\"activeParameterSupport\":false},\"contextSupport\":false},\"references\":{\"dynamicRegistration\":false},\"definition\":{\"dynamicRegistration\":false,\"linkSupport\":false},\"declaration\":{\"dynamicRegistration\":false,\"linkSupport\":false},\"implementation\":{\"dynamicRegistration\":false,\"linkSupport\":false},\"typeDefinition\":{\"dynamicRegistration\":false,\"linkSupport\":false},\"documentHighlight\":{\"dynamicRegistration\":false},\"codeAction\":{\"dynamicRegistration\":false,\"codeActionLiteralSupport\": {\"codeActionKind\":{\"valueSet\":[\"quickfix\",\"refactor\",\"refactor.extract\",\"refactor.inline\",\"refactor.rewrite\",\"source\",\"source.organizeImports\"]}},\"isPreferredSupport\":true,\"disabledSupport\":false,\"dataSupport\":false},\"formatting\":{\"dynamicRegistration\":false},\"rangeFormatting\":{\"dynamicRegistration\":false},\"rename\":{\"dynamicRegistration\":false,\"prepareSupport\":false,\"honorsChangeAnnotations\":false},\"inlayHint\":{\"dynamicRegistration\":false},\"publishDiagnostics\":{\"relatedInformation\":false,\"codeDescriptionSupport\":false,\"codeDescriptionSupport\":false,\"dataSupport\":false,\"versionSupport\":false,\"tagSupport\":{\"valueSet\":[1,2]}},\"callHierarchy\":{\"dynamicRegistration\":false}},\"experimental\":{}},\"clientInfo\":{\"name\":\"lspce\",\"version\":\"1.1.0\"}}}" 2024-07-07 14:13:42.441 - stdio read error malformed header: "/Users/alkurbatov/work/src/github.com/alkurbatov/tttt/tttt/main.py\n" 2024-07-07 14:13:42.441 - Response 2024-07-07 14:13:42.441 - No request tick for id 1 2024-07-07 14:13:42.441 - stdio read error malformed header: " /Users/alkurbatov/work/src/github.com/alkurbatov/tttt/tttt/main.py:2:8 - error: Import \"pandas\" could not be resolved (reportMissingImports)\n" 2024-07-07 14:13:42.441 - stdio read error malformed header: " /Users/alkurbatov/work/src/github.com/alkurbatov/tttt/tttt/main.py:3:8 - error: Import \"baostock\" could not be resolved (reportMissingImports)\n" 2024-07-07 14:13:42.442 - stdio read error malformed header: " /Users/alkurbatov/work/src/github.com/alkurbatov/tttt/tttt/main.py:5:6 - error: Import \"pandas\" could not be resolved (reportMissingImports)\n" 2024-07-07 14:13:42.442 - Response 2024-07-07 14:13:42.442 - No request tick for id 1 2024-07-07 14:13:42.442 - Response 2024-07-07 14:13:42.442 - No request tick for id 1 2024-07-07 14:13:42.442 - Response 2024-07-07 14:13:42.442 - No request tick for id 1 2024-07-07 14:13:42.442 - stdio read error malformed header: "3 errors, 0 warnings, 0 informations \n" 2024-07-07 14:13:42.442 - Response 2024-07-07 14:13:42.442 - No request tick for id 1 2024-07-07 14:13:42.450 - stderr reach EOF 2024-07-07 14:13:42.450 - stderr reach EOF