Exception in multi-root workspace without "path".
メンテナーはふだん 5 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
調査の方向性
python/vscode_common_python_lsp/server.py の、指定されたソース行にある update_workspace_settings の周辺から始め、示されているマルチルートワークスペース構成で障害を再現します。ファイルシステムパスのないワークスペースエントリがどのように処理されるかを追跡します。完了条件は、リモートワークスペースで初期化時に NoneType パス例外が発生しなくなり、影響を受ける言語サーバーが正常に起動することです。
索引モデルが issue の本文から書いたものです。
説明
When using the MicroPico extension, for example, with its Remote Workspace support that adds a multi-root workspace as such:
{
"folders": [
{
"path": "."
},
{
"name": "Mpy Remote Workspace",
"uri": "pico:"
}
]
}
The Pylint server (ms-python.pylint) appears to fail because of a non-existent "path" attribute (or similar). I'm also seeing the same error with both the Black Formatter (ms-python.black-formatter) and isort (ms-python.isort), ending with the same stack frames.
[info] Server: Start requested.
[info] Exception occurred for message "0"
Traceback (most recent call last):
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\pygls\protocol\json_rpc.py", line 300, in _send_handler_result
self._send_response(msg_id, result=future.result())
~~~~~~~~~~~~~^^
File "C:\Program Files\Python314\Lib\concurrent\futures\_base.py", line 447, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "C:\Program Files\Python314\Lib\concurrent\futures\_base.py", line 396, in __get_result
raise self._exception
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\pygls\protocol\json_rpc.py", line 273, in _run_generator
value = future.result() if future is not None else None
~~~~~~~~~~~~~^^
File "C:\Program Files\Python314\Lib\concurrent\futures\_base.py", line 447, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "C:\Program Files\Python314\Lib\concurrent\futures\_base.py", line 396, in __get_result
raise self._exception
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\pygls\protocol\json_rpc.py", line 236, in _execute_handler
result = handler(*args, **kwargs)
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\tool\lsp_server.py", line 718, in initialize
tool_server.apply_settings(params)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\vscode_common_python_lsp\server.py", line 482, in apply_settings
self.update_workspace_settings(settings)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\vscode_common_python_lsp\server.py", line 152, in update_workspace_settings
key = normalize_path(
uris.to_fs_path(setting["workspace"]),
resolve_symlinks=self.config.resolve_symlinks,
)
File "***\.vscode\extensions\ms-python.pylint-2026.7.11691008\bundled\libs\vscode_common_python_lsp\paths.py", line 236, in normalize_path
path = pathlib.Path(file_path)
File "C:\Program Files\Python314\Lib\pathlib\__init__.py", line 150, in __init__
raise TypeError(
...<2 lines>...
f"not {type(path).__name__!r}")
TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType'
[info] [Error] Server initialization failed.
Relevant source: https://github.com/microsoft/vscode-common-python-lsp/blob/0258b220929850986b1d9413ac27b203a72acc04/python/vscode_common_python_lsp/server.py#L137
Workarounds
A workaround is to disable the Remote Workspace, and not enable until after the analysis servers have already started.
- 主要言語
- Python
- スター
- 2
- フォーク
- 4
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-common-python-lsp のほかの issue
-
Support singleton server instance or workspace-folder configuration for multi-root workspaces再び着手できるかも @edvilme が 115 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug triage-needed
microsoft/vscode-common-python-lsp#49 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 5 日以内に返信
microsoft/vscode-common-python-lsp の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 60/100
521xueweihan/HelloGitHub#3924 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
wilbowes/EchoMuse#869 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
EclipseFdn/open-vsx.org#14043 ·
メンテナーはふだん 1 日以内に返信
-
test: TestServeUntilStale races the server's close against the client's sendall (BrokenPipeError under load)対応中かも @evoludigit が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
メンテナーはふだん 1 日以内に返信