Exception in multi-root workspace without "path".
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 65/100
Rechercherichtung
Beginne in python/vscode_common_python_lsp/server.py bei update_workspace_settings an der angegebenen Quellzeile und reproduziere den Fehler mit der gezeigten Konfiguration für einen Multi-Root-Workspace. Verfolge, wie ein Workspace-Eintrag ohne Dateisystempfad behandelt wird; fertig ist die Aufgabe, wenn die Initialisierung für Remote-Workspaces keine NoneType-Pfadausnahme mehr auslöst und die betroffenen Language Server erfolgreich starten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 2
- Forks
- 3
- Ø Merge
- 1 T. 5 Std.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-common-python-lsp
-
Support singleton server instance or workspace-folder configuration for multi-root workspacesEvtl. wieder frei @edvilme hat das vor 130 Tagen übernommen, und es ist kein Pull Request offen. Offenbug triage-needed
microsoft/vscode-common-python-lsp#49 · 1 Reaktion · 2 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/vscode-common-python-lsp
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
nansencenter/geodataset#39 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
awslabs/visual-asset-management-system#804 ·
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
odoo/odoo#297927 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
link-rot
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 67/100