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

Improve error message about missing websockets module #528

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

tomplus
Copy link
Contributor

@tomplus tomplus commented Feb 7, 2024

A tiny fix to help copy&paste a pip command to install websockets.
Thanks.

A tiny fix to help copy&paste a pip command to install websockets. Thanks
@@ -109,7 +109,7 @@ def start_ws_lang_server(port, check_parent_process, handler_class):
import websockets
except ImportError as e:
raise ImportError(
"websocket modules missing. Please run pip install 'python-lsp-server[websockets]"
"websocket modules missing. Please run 'pip install python-lsp-server[websockets]'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the python-lsp-server[websockets] part that needs quotes to work in a shell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, in my terminal it's not necessary, so I wanted to use quotes to mark a part to copy.
What about adding a colon and quotes as you suggest (it works for me):

websocket modules missing. Please run: pip install 'python-lsp-server[websockets]'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me

@ccordoba12 ccordoba12 changed the title Fix error message in python_lsp.py Improve error message about missing websockets module Feb 22, 2024
@ccordoba12 ccordoba12 added the enhancement New feature or request label Feb 22, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution @tomplus!

@ccordoba12 ccordoba12 added this to the v1.10.1 milestone Feb 22, 2024
@ccordoba12 ccordoba12 merged commit ed00eac into python-lsp:develop Feb 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants