lsp-pyright
lsp-pyright copied to clipboard
wrong-type-argument hash-table-p on pyright startup
I'm getting this error whenever lsp is started on a python buffer:
Error processing message (wrong-type-argument hash-table-p (:jsonrpc "2.0" :method "window/logMessage" :params (:type 3 :message "Pyright language server 1.1.258 starting"))).
Error processing message (wrong-type-argument hash-table-p (:jsonrpc "2.0" :method "window/logMessage" :params (:type 3 :message "Server root directory: /snap/pyright/337/lib/node_modules/pyright/dist/"))).
Error processing message (wrong-type-argument hash-table-p (:jsonrpc "2.0" :id 1 :result (:capabilities (:textDocumentSync 2 :definitionProvider (:workDoneProgress t) :declarationProvider (:workDoneProgress t) :typeDefinitionProvider (:workDoneProgress t) :referencesProvider (:workDoneProgress t) :documentSymbolProvider (:workDoneProgress t) :workspaceSymbolProvider (:workDoneProgress t) :hoverProvider (:workDoneProgress t) :documentHighlightProvider (:workDoneProgress t) :renameProvider (:prepareProvider t :workDoneProgress t) :completionProvider (:triggerCharacters ["." "["] :resolveProvider t :workDoneProgress t :completionItem (:labelDetailsSupport t)) :signatureHelpProvider (:triggerCharacters ["(" "," ")"] :workDoneProgress t) :codeActionProvider (:codeActionKinds ["quickfix" "source.organizeImports"] :workDoneProgress t) :executeCommandProvider (:commands [] :workDoneProgress t) :callHierarchyProvider t)))).
the pyright process is running correctly, but communication doesn't seem to work.
I've tried wiping and reinstalling all packages (including wiping all .elc
files), with no change.
Turns out the issue is caused by having lsp-use-plists
set to t
(as suggested by https://emacs-lsp.github.io/lsp-mode/page/performance/#use-plists-for-deserialization).
Is this perhaps some missing support in lsp-pyright
?
Faced same issue trying to improve lsp-mode performance on huge project
Turns out the issue is caused by having
lsp-use-plists
set tot
(as suggested by https://emacs-lsp.github.io/lsp-mode/page/performance/#use-plists-for-deserialization). Is this perhaps some missing support inlsp-pyright
?
I met same issue, and fixed it by this https://github.com/emacs-lsp/lsp-mode/issues/1036
So you have it working with pyright? I deleted all elc and eln files and still had the issue.
So you have it working with pyright? I deleted all elc and eln files and still had the issue.
yeah,it worked. This problem has really troubled me for a long time, but it has indeed been solved.
If the above method does not work, you can also try the method mentioned by albertodonato
(setq lsp-use-plists nil)