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

pylsp TimeoutError #539

Open
rfdzan opened this issue Mar 21, 2024 · 3 comments
Open

pylsp TimeoutError #539

rfdzan opened this issue Mar 21, 2024 · 3 comments

Comments

@rfdzan
Copy link

rfdzan commented Mar 21, 2024

I used pylsp with helix editor. This error pops up from the log:

2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "2024-03-20 17:27:49,810 WIB - WARNING - pylsp.workspace - There was an error while trying to initialize progress reporting.Likely progress reporting was used in a synchronous LSP handler, which is not supported by progress reporting yet. To prevent waiting for the timeout you can set `skip_token_initialization=True`. Not every editor will show progress then, but many will.\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "Traceback (most recent call last):\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "  File \"/home/user/Documents/python_proj/pyweek37/lib/python3.12/site-packages/pylsp/workspace.py\", line 252, in _progress_begin\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "    ).result(timeout=1.0)\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "      ^^^^^^^^^^^^^^^^^^^\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "  File \"/home/user/.pyenv/versions/3.12.2/lib/python3.12/concurrent/futures/_base.py\", line 458, in result\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "    raise TimeoutError()\n"
2024-03-20T17:27:49.812 helix_lsp::transport [ERROR] pylsp err <- "TimeoutError\n"

it talks about setting skip_token_initialization to true, however I am not sure where to set it. it's not on the configuration either.

@ccordoba12
Copy link
Member

It seems you have a third-party pylsp plugin that is trying to report progress from a synchronous handler.

@rfdzan
Copy link
Author

rfdzan commented Mar 26, 2024

is the problem instead about the handler and not pylsp?

@ZedThree
Copy link

I'm seeing this a lot, and I think is causing completions to be very slow (several seconds). I tried disabled all plugins but still saw this error message. Is there a way of working out where this is coming from?

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

3 participants