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

Server initialization failed #292

Closed
bjornasm opened this issue Mar 25, 2024 · 1 comment
Closed

Server initialization failed #292

bjornasm opened this issue Mar 25, 2024 · 1 comment

Comments

@bjornasm
Copy link

bjornasm commented Mar 25, 2024

Connecting to host over SSH, and got this error message. Got it before and completely uninstalled mypy (on both host and client machine) + restarted vscode to fix. However, at nest login I got the same errors.

I have no clue how to debut this further. The error messages is repeated five times untill it refuses to connect to server.

2024-03-25 12:01:22.835 [info] Name: Mypy Type Checker
2024-03-25 12:01:22.835 [info] Module: mypy
2024-03-25 12:01:22.835 [info] Python extension loading
2024-03-25 12:01:22.835 [info] Waiting for interpreter from python extension.
2024-03-25 12:01:22.835 [info] Python extension loaded
2024-03-25 12:01:22.835 [info] Server run command: env/bin/python .vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/tool/lsp_server.py
2024-03-25 12:01:22.835 [info] Server: Start requested.
2024-03-25 12:01:23.128 [info] Traceback (most recent call last):
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/tool/lsp_server.py", line 70, in <module>

2024-03-25 12:01:23.128 [info]     from pygls import server, uris, workspace
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/server.py", line 37, in <module>

2024-03-25 12:01:23.128 [info]     from pygls.lsp import ConfigCallbackType, ShowDocumentCallbackType
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/lsp/__init__.py", line 38, in <module>

2024-03-25 12:01:23.128 [info]     from typeguard import check_type
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/__init__.py", line 21, in <module>

2024-03-25 12:01:23.129 [info]     from ._importhook import ImportHookManager as ImportHookManager
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/_importhook.py", line 22, in <module>

2024-03-25 12:01:23.129 [info]     from typing_extensions import Buffer
ImportError: cannot import name 'Buffer' from 'typing_extensions' (env/lib/python3.11/site-packages/typing_extensions.py)

2024-03-25 12:01:23.192 [info] [Error - 12:01:23] Server initialization failed.
2024-03-25 12:01:23.192 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:23.192 [info] [Info  - 12:01:23] Connection to server got closed. Server will restart.
2024-03-25 12:01:23.192 [info] true
2024-03-25 12:01:23.192 [info] [Error - 12:01:23] Mypy Type Checker client: couldn't create connection to server.
2024-03-25 12:01:23.192 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:23.589 [info] Traceback (most recent call last):
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/tool/lsp_server.py", line 70, in <module>

2024-03-25 12:01:23.589 [info]     from pygls import server, uris, workspace
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/server.py", line 37, in <module>
    from pygls.lsp import ConfigCallbackType, ShowDocumentCallbackType
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/lsp/__init__.py", line 38, in <module>

2024-03-25 12:01:23.590 [info]     from typeguard import check_type
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/__init__.py", line 21, in <module>

2024-03-25 12:01:23.590 [info]     from ._importhook import ImportHookManager as ImportHookManager

2024-03-25 12:01:23.590 [info]   File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/_importhook.py", line 22, in <module>
    from typing_extensions import Buffer
ImportError: cannot import name 'Buffer' from 'typing_extensions' (env/lib/python3.11/site-packages/typing_extensions.py)

2024-03-25 12:01:23.642 [info] [Error - 12:01:23] Server initialization failed.
2024-03-25 12:01:23.642 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:23.642 [info] [Info  - 12:01:23] Connection to server got closed. Server will restart.
2024-03-25 12:01:23.642 [info] true
2024-03-25 12:01:23.642 [info] [Error - 12:01:23] Mypy Type Checker client: couldn't create connection to server.
2024-03-25 12:01:23.642 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:23.642 [error] Server: Start failed: Error: Pending response rejected since connection got disposed
2024-03-25 12:01:24.034 [info] Traceback (most recent call last):
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/tool/lsp_server.py", line 70, in <module>

2024-03-25 12:01:24.034 [info]     from pygls import server, uris, workspace
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/server.py", line 37, in <module>
    from pygls.lsp import ConfigCallbackType, ShowDocumentCallbackType
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/pygls/lsp/__init__.py", line 38, in <module>
    from typeguard import check_type
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/__init__.py", line 21, in <module>
    from ._importhook import ImportHookManager as ImportHookManager
  File ".vscode-server/extensions/ms-python.mypy-type-checker-2023.6.0/bundled/libs/typeguard/_importhook.py", line 22, in <module>

2024-03-25 12:01:24.035 [info]     from typing_extensions import Buffer

2024-03-25 12:01:24.035 [info] ImportError: cannot import name 'Buffer' from 'typing_extensions' (env/lib/python3.11/site-packages/typing_extensions.py)

2024-03-25 12:01:24.080 [info] [Error - 12:01:24] Server initialization failed.
2024-03-25 12:01:24.080 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:24.080 [info] [Info  - 12:01:24] Connection to server got closed. Server will restart.
2024-03-25 12:01:24.080 [info] true
024-03-25 12:01:24.080 [info] [Error - 12:01:24] Mypy Type Checker client: couldn't create connection to server.
2024-03-25 12:01:24.080 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2024-03-25 12:01:24.080 [info] [Error - 12:01:24] Restarting server failed
2024-03-25 12:01:24.080 [info]   Message: Pending response rejected since connection got disposed
  Code: -32097 
@bjornasm
Copy link
Author

Upgrading from 1.3.0 to 1.9.0 on the mypy installed in venv did not change this behaviour. However updating typing_extensions in the venv seems to have solved it, following this issue: microsoft/vscode-black-formatter#378

Probably an issue with not up to date dependencies?

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

No branches or pull requests

1 participant