Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong-type-argument hash-table-p on pyright startup #75

Open
albertodonato opened this issue Jul 15, 2022 · 5 comments
Open

wrong-type-argument hash-table-p on pyright startup #75

albertodonato opened this issue Jul 15, 2022 · 5 comments

Comments

@albertodonato
Copy link

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.

@albertodonato
Copy link
Author

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?

@jumper047
Copy link

Faced same issue trying to improve lsp-mode performance on huge project

@luyajun01
Copy link

luyajun01 commented Feb 10, 2023

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?

I met same issue, and fixed it by this emacs-lsp/lsp-mode#1036

@noctuid
Copy link

noctuid commented Feb 10, 2023

So you have it working with pyright? I deleted all elc and eln files and still had the issue.

@luyajun01
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants